This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
monitoring:nagios_tips [2023/01/18 12:58] manu |
monitoring:nagios_tips [2023/01/18 13:03] (current) manu |
||
---|---|---|---|
Line 2: | Line 2: | ||
Check if commands can run with SSL | Check if commands can run with SSL | ||
- | <cli> | + | <cli prompt='#'> |
- | [root@lnxb080 linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnxa081 -c check_fs | + | [root@nagios linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnx081 -c check_fs |
OK | OK | ||
</cli> | </cli> | ||
Line 13: | Line 13: | ||
Or without: | Or without: | ||
- | <cli> | + | <cli prompt='#'> |
- | [root@lnxb080 linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnxa081 -n -c check_fs | + | [root@nagios linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnx081 -n -c check_fs |
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected). | CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected). | ||
</cli> | </cli> | ||
- | Which on lnxb080 looks like this in config <cli>check_lnx_param_nossl_nrpe!check_fs </cli> | + | Which on nagios looks like this in config <cli>check_lnx_param_nossl_nrpe!check_fs </cli> |
Because this is a command shortcut for the command above see command.cfg | Because this is a command shortcut for the command above see command.cfg | ||
Line 24: | Line 24: | ||
VI commands to remove all _nossl_nrpe checks: | VI commands to remove all _nossl_nrpe checks: | ||
+ | <code> | ||
+ | [ESC]+:s/check_lnx_nossl_nrpe/check_lnx_nrpe/g | ||
- | %s/check_lnx_nossl_nrpe/check_lnx_nrpe/g | + | [ESC]+:s/check_lnx_param_nossl_nrpe/check_lnx_param_nrpe/g |
- | + | </code> | |
- | %s/check_lnx_param_nossl_nrpe/check_lnx_param_nrpe/g | + | |
nossl : | nossl : | ||
- | |||
<cli> | <cli> | ||
command_name check_lnx_param_nossl_nrpe | command_name check_lnx_param_nossl_nrpe | ||
check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$ | check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$ | ||
- | + | </cli> | |
- | [root@lnxb081 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H lnxb080 -n -c check_disk -a 20% 35% / | + | <cli prompt='#'> |
+ | [root@nagios linux]# /usr/lib64/nagios/plugins/check_nrpe -H nagios -n -c check_disk -a 20% 35% / | ||
</cli> | </cli> | ||
Line 46: | Line 47: | ||
Other example | Other example | ||
<cli prompt='#'> | <cli prompt='#'> | ||
- | [root@lnxb080 linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnxb21033 -c check_procs -a '-w 500 -c 700 -s RSZDT' | + | [root@nagios linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnx033 -c check_procs -a '-w 500 -c 700 -s RSZDT' |
PROCS CRITICAL: 126 processes with STATE = RSZDT | procs=126;-w;-s;0; | PROCS CRITICAL: 126 processes with STATE = RSZDT | procs=126;-w;-s;0; | ||
- | [root@lnxb080 linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnxb21033 -n -c check_procs -a '-w 500 -c 700 -s RSZDT' | + | [root@nagios linux]# /usr/lib64/nagios/plugins/check_nrpe -H lnx033 -n -c check_procs -a '-w 500 -c 700 -s RSZDT' |
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected). | CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected). | ||
</cli> | </cli> |