If using
NRPE:
define command {
command_name nrpe_args
command_line $USER1$/check_nrpe -t 20 -n -u -H
$HOSTNAME$
-c $ARG1$ -a $ARG2$
}
OR
define command {
command_name nrpe_args
command_line $USER1$/check_nrpe -t 20 -n -u -H
$HOSTADDRESS$
-c $ARG1$ -a $ARG2$
}
|
define service {
check_command nrpe_args!logxray!'localhost /var/tmp/logXray autonda
/opt/apps/alert.log 60m 'ERROR'
'.' 5 5 tomcat_logchk -ndshow'
service_description PLM LogCheck - Tomcat
notifications_enabled 0
max_check_attempts 1
check_interval 300
contact_groups retail-group
host_name
monitor-01.logrobot.com,monitor-02.logrobot.com,monitor-03.logrobot.com
use unix_service
}
|
command[logxray]=/usr/lib64/nagios/plugins/logxray $ARG1$
|
If using
the custom logXray
agent:
define command {
command_name NLM
command_line $USER1$/nlm $ARG1$
$HOSTNAME$
$ARG2$ $ARG3$ $ARG4$ "$ARG5$" "$ARG6$" $ARG7$ $ARG8$ $ARG9$ $ARG10$ $ARG11$
$ARG12$
}
OR
define command {
command_name NLM
command_line $USER1$/nlm $ARG1$
$HOSTADDRESS$ $ARG2$ $ARG3$ $ARG4$ "$ARG5$" "$ARG6$" $ARG7$ $ARG8$ $ARG9$ $ARG10$
$ARG11$ $ARG12$
}
|
define service {
check_command NLM!llogxray!/var/tmp/logXray!autonda!/var/log/proteus.log!15m!500.html!500 Internal
Server Error!1!2!500_Errors!-ndshow
max_check_attempts
1
service_description
500_ERRORS_LOGCHECK
host_name logxray-01.com,logxray-02.com,logxray-03.com
use five-minute-interval
}
|
Sample Screenshot:
Screenshot of a similar but different setup:
|