Skip to content

Commit

Permalink
by-ssh: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
markuslf committed Aug 8, 2023
1 parent faed0a4 commit 2423e46
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions check-plugins/by-ssh/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,23 @@ You want to get a CRIT if the command does not return ``Command Result : 0``. A
--shell \
--command 'status interface | tail -1'
Get a WARNING if the ``/opt`` directory does NOT have ``rwxrwxrwx`` permissions:

.. code-block:: bash
./by-ssh \
--hostname appserver \
--username nagios \
--warning-regex '^(?!drwxrwxrwx.*).*opt$' \
--command 'ls -ld /opt'
# another way:
./by-ssh \
--hostname appserver \
--username nagios \
--warning-regex '^(?!777)\d{3}$' \
--command 'stat /opt -c %a'
Output in case of an error will look like this:

.. code-block:: text
Expand Down

0 comments on commit 2423e46

Please sign in to comment.