Skip to content

Commit 2423e46

Browse files
committed
by-ssh: Update README
1 parent faed0a4 commit 2423e46

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

check-plugins/by-ssh/README.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,23 @@ You want to get a CRIT if the command does not return ``Command Result : 0``. A
192192
--shell \
193193
--command 'status interface | tail -1'
194194
195+
Get a WARNING if the ``/opt`` directory does NOT have ``rwxrwxrwx`` permissions:
196+
197+
.. code-block:: bash
198+
199+
./by-ssh \
200+
--hostname appserver \
201+
--username nagios \
202+
--warning-regex '^(?!drwxrwxrwx.*).*opt$' \
203+
--command 'ls -ld /opt'
204+
205+
# another way:
206+
./by-ssh \
207+
--hostname appserver \
208+
--username nagios \
209+
--warning-regex '^(?!777)\d{3}$' \
210+
--command 'stat /opt -c %a'
211+
195212
Output in case of an error will look like this:
196213

197214
.. code-block:: text

0 commit comments

Comments
 (0)