Page 1 of 3
Debian not work with NRPE $ARG$
Posted: Mon Mar 25, 2019 10:55 am
by liberodark
Hi,
Have make a EON and install on clients Centos / Debian NRPE with $ARG$
But is very strange on Centos work great but all debian not work just work with no $ARG$
My configuration on Centos / Debian :
Centos : on /etc/nrpe.d/commands.cfg
Code: Select all
################################################################################
#
# nrpe command configuration file
#
# COMMAND DEFINITIONS
# Syntax:
# command[<command_name>]=<command_line>
#
command[service]=/usr/lib64/nagios/plugins/check_service.sh -o linux -t "systemctl list-units --state=failed"
command[memory]=/usr/lib64/nagios/plugins/check_mem.sh -w $ARG1$ -c $ARG2$
command[cpu]=/usr/lib64/nagios/plugins/check_cpu_utilization.sh -w $ARG1$ -c $ARG2$
command[users]=/usr/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
command[load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[swap]=/usr/lib64/nagios/plugins/check_swap -w $ARG1$ -c $ARG2$
command[root_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[usr_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[var_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z
command[total_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$
command[proc_named]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_crond]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_syslogd]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_rsyslogd]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
Debian : on /etc/nagios/nrpe.d/commands.cfg
Code: Select all
################################################################################\n
#
# nrpe command configuration file
#
# COMMAND DEFINITIONS
# Syntax:
# command[<command_name>]=<command_line>
#
command[service]=/usr/lib/nagios/plugins/check_service.sh -o linux -t "systemctl list-units --state=failed"
command[memory]=/usr/lib/nagios/plugins/check_mem.sh -w $ARG1$ -c $ARG2$
command[cpu]=/usr/lib/nagios/plugins/check_cpu_utilization.sh -w $ARG1$ -c $ARG2$
command[users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
command[load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[swap]=/usr/lib/nagios/plugins/check_swap -w $ARG1$ -c $ARG2$
command[root_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[usr_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[var_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -m
command[zombie_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z
command[total_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$
command[proc_named]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_crond]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_syslogd]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
command[proc_rsyslogd]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
On Debian this configuration work :
Code: Select all
command[service]=/usr/lib/nagios/plugins/check_service.sh -o linux -t "systemctl list-units --state=failed"
command[memory]=/usr/lib/nagios/plugins/check_mem.sh -w 70% -c 90%
command[cpu]=/usr/lib/nagios/plugins/check_cpu_utilization.sh -w 70 -c 90
command[users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[swap]=/usr/lib/nagios/plugins/check_swap -w 20% -c 10%
command[root_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p / -m
command[usr_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /usr -m
command[var_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /var -m
command[zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[total_procs]=/usr/lib/nagios/plugins/check_procs -w 190 -c 200
command[proc_named]=/usr/lib/nagios/plugins/check_procs -w 1: -c 1:2 -C named
command[proc_crond]=/usr/lib/nagios/plugins/check_procs -w 1: -c 1:5 -C crond
command[proc_syslogd]=/usr/lib/nagios/plugins/check_procs -w 1: -c 1:2 -C syslog-ng
command[proc_rsyslogd]=/usr/lib/nagios/plugins/check_procs -w 1: -c 1:2 -C rsyslogd
Centos install :
Code: Select all
yum install -y epel-release nrpe nagios-plugins-users nagios-plugins-load nagios-plugins-swap nagios-plugins-disk nagios-plugins-procs bc
Debian install :
Code: Select all
apt install -y nagios-nrpe-server nagios-plugins-basic ufw bc
Port 5666 TCP is open
Commands in Nagios for Centos or Debian:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -c cpu -a $ARG1$ $ARG2$
Version of NRPE :
Debian 3.0.1
Centos 3.2.1
Centos / Debian
don't blame nrpe = 1
PS : Have try on fresh debian install to compile 3.2.1 and add my commands is same error
But on centos all is ok and on debian have : NRPE: Command 'cpu!70!90' not defined
You have any idea ?
Best Regards
Re: Debian not work with NRPE $ARG$
Posted: Mon Mar 25, 2019 2:03 pm
by scottwilkerson
Can you show the Nagios service definition of the service for the Debian machine.
the error you are getting
liberodark wrote:Code: Select all
]NRPE: Command 'cpu!70!90' not defined
Makes me thing you have something wrong in the
check_command definition for the service for the debian machine
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 3:12 am
by liberodark
Hi,
This is my Service on debian :
Code: Select all
nagios-nrpe-server.service - Nagios Remote Plugin Executor
Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-03-25 16:26:01 CET; 16h ago
Docs: http://www.nagios.org/documentation
Process: 6295 ExecStopPost=/bin/rm -f /var/run/nagios/nrpe.pid (code=exited, status=0/SUCCESS)
Main PID: 6298 (nrpe)
Tasks: 1 (limit: 19660)
CGroup: /system.slice/nagios-nrpe-server.service
└─6298 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
Mar 25 16:26:01 v-yuno.noho.st systemd[1]: Stopped Nagios Remote Plugin Executor.
Mar 25 16:26:01 v-yuno.noho.st systemd[1]: Started Nagios Remote Plugin Executor.
Mar 25 16:26:01 v-yuno.noho.st nrpe[6298]: Starting up daemon
Mar 25 16:26:01 v-yuno.noho.st nrpe[6298]: Server listening on 0.0.0.0 port 5666.
Mar 25 16:26:01 v-yuno.noho.st nrpe[6298]: Server listening on :: port 5666.
Mar 25 16:26:01 v-yuno.noho.st nrpe[6298]: Listening for connections on port 5666
Mar 25 16:26:01 v-yuno.noho.st nrpe[6298]: Allowing connections from: 127.0.0.1,10.10.99.15
~
[Unit]
Description=Nagios Remote Plugin Executor
Documentation=
http://www.nagios.org/documentation
After=var-run.mount nss-lookup.target network.target local-fs.target remote-fs.target time-sync.target
Before=
[email protected] plymouth-quit.service xdm.service
Conflicts=nrpe.socket
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
Restart=on-abort
PIDFile=/var/run/nagios/nrpe.pid
EnvironmentFile=-/etc/default/nagios-nrpe-server
ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_OPTS
ExecReload=/bin/kill -HUP $MAINPID
ExecStopPost=/bin/rm -f /var/run/nagios/nrpe.pid
TimeoutStopSec=60
User=nagios
Group=nagios
PrivateTmp=true
OOMScoreAdjust=-500
https://i.imgur.com/XFEAWsP.jpg
Is that what you wanted?
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 7:27 am
by scottwilkerson
liberodark wrote:Is that what you wanted?
No, I'm looking for the .cfg file that contains the "Check CPU" service for Nagios
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:13 am
by liberodark
The command file :
Code: Select all
cat commands.cfg
# Written by NagiosCommandExporter from Eonweb Configurator 3.0 on March 25, 2019, 4:27 pm
define command {
command_name dns_status
command_line $USER1$/check_dns -H $ARG1$ -s $HOSTADDRESS$ -w $ARG2$ -c $ARG3$
}
define command {
command_name check_ftp
command_line $USER1$/check_ftp -H $HOSTADDRESS$
}
define command {
command_name check_hpjd
command_line $USER1$/check_hpjd -H $HOSTADDRESS$ -C $USER2$
}
define command {
command_name check_nntp
command_line $USER1$/check_nntp -H $HOSTADDRESS$
}
define command {
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 1
}
define command {
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
}
define command {
command_name check_telnet
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
}
define command {
command_name check_udp
command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
}
define command {
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
}
define command {
command_name notify-by-email-host
command_line /srv/eyesofnetwork/notifier/bin/notifier.pl -t host -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -e "$HOSTSTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$HOSTOUTPUT$" -A "$HOSTGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$HOSTNOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
}
define command {
command_name host-notify-by-epager
command_line /usr/bin/printf "%b" "Host \'$HOSTALIAS$\' is $HOSTSTATE$\\nInfo: $HOSTOUTPUT$\\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
}
define command {
command_name notify-by-email-service
command_line /srv/eyesofnetwork/notifier/bin/notifier.pl -t service -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -s "$SERVICEDESC$" -e "$SERVICESTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$SERVICEOUTPUT$" -A "$HOSTGROUPNAMES$" -B "$SERVICEGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$SERVICENOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
}
define command {
command_name notify-by-epager
command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\\nHost: $HOSTNAME$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\nInfo: $SERVICEOUTPUT$\\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
}
define command {
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\\t$HOSTNAME$\\t$HOSTSTATE$\\t$HOSTATTEMPT$\\t$HOSTSTATETYPE$\\t$HOSTEXECUTIONTIME$\\t$HOSTOUTPUT$\\t$HOSTPERFDATA$\\n" >> /srv/eyesofnetwork/nagios/var/log/host-perfdata.out
}
define command {
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\\t$HOSTNAME$\\t$SERVICEDESC$\\t$SERVICESTATE$\\t$SERVICEATTEMPT$\\t$SERVICESTATETYPE$\\t$SERVICEEXECUTIONTIME$\\t$SERVICELATENCY$\\t$SERVICEOUTPUT$\\t$SERVICEPERFDATA$\\n" >> /srv/eyesofnetwork/nagios/var/log/service-perfdata.out
}
define command {
command_name event-browser-service
command_line /srv/eyesofnetwork/ged/scripts/ged-nagios-service "$HOSTNAME$" "$SERVICEDESC$" "$SERVICESTATE$" "$SERVICEOUTPUT$" "$HOSTADDRESS$" "$HOSTALIAS$" "$HOSTGROUPNAMES$" "$SERVICEGROUPNAMES$"
}
define command {
command_name linux_cpu
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -T netsc -C $USER2$ -w $ARG1$ -c $ARG2$ -f
}
define command {
command_name linux_memory
command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $USER2$ -w $ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -b -2 -f
}
define command {
command_name solaris_cpu
command_line $USER1$/check_sun_cpu_ok.pl -H $HOSTADDRESS$ -C $USER2$
}
define command {
command_name solaris_memory
command_line $USER1$/check_sun_memory.pl -H $HOSTADDRESS$ -C $USER2$ -w $ARG1$ -c $ARG2$
}
define command {
command_name mssql_alldb_stat
command_line $USER1$/check_snmp_mssql -H $HOSTADDRESS$ -C $USER2$
}
define command {
command_name mssql_db_stat
command_line $USER1$/check_snmp_mssql -H $HOSTADDRESS$ -d $ARG1$ -C $USER2$
}
define command {
command_name mssql_db_list
command_line $USER1$/check_snmp_mssql -H $HOSTADDRESS$ -i -C $USER2$
}
define command {
command_name notes_availability
command_line $USER1$/check_lotus.pl -H $HOSTADDRESS$
}
define command {
command_name dhcp_status
command_line $USER1$/check_dhcp -s $HOSTADDRESS$
}
define command {
command_name check_snmp_interface
command_line perl $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $USER2$ -r -n $ARG1$ -k -w $ARG2$,$ARG3$ -c $ARG4$,$ARG5$
}
define command {
command_name process-service-perfdata-file
command_line /bin/mv $USER10$/var/log/service-perfdata $USER10$/var/spool/service-perfdata.$TIMET$
}
define command {
command_name cisco_ifstatus
command_line perl $USER1$/check_snmp_cisco_ifstatus -H $HOSTADDRESS$ -C $USER2$ -i $ARG1$
}
define command {
command_name process-host-perfdata-file
command_line /bin/mv $USER10$/var/log/host-perfdata $USER10$/var/spool/host-perfdata.$TIMET$
}
define command {
command_name cisco_link_error
command_line $USER1$/check_snmp_cisco_link_errors.sh $HOSTADDRESS$ $USER2$ 4000000 4000000 4000000 -t 90
}
define command {
command_name cisco_memory
command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $USER2$ -I -w $ARG1$ -c $ARG2$ -f
}
define command {
command_name event-browser-host
command_line /srv/eyesofnetwork/ged/scripts/ged-nagios-host "$HOSTNAME$" "PING" "$HOSTSTATE$" "$HOSTOUTPUT$" "$HOSTADDRESS$" "$HOSTALIAS$" "$HOSTGROUPNAMES$"
}
define command {
command_name netapp_hardware
command_line $USER1$/check_naf.py -H $HOSTADDRESS$ -C $USER2$ -P2 $ARG1$
}
define command {
command_name netapp_diskused
command_line perl $USER1$/check_netapp2 -H $HOSTADDRESS$ -v DISKUSED -o $ARG1$
}
define command {
command_name process
command_line perl $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ -C $USER2$ -r -n $ARG1$
}
define command {
command_name snmp_cpu
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C $USER2$ -w $ARG1$ -c $ARG2$ -f
}
define command {
command_name win_snmp_memory
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $USER2$ -m "Mem" -w $ARG1$ -c $ARG2$ -f
}
define command {
command_name partition-fs_snmp
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $USER2$ -m $ARG1$ -w $ARG2$ -c $ARG3$ -S 0 -q FixedDisk
}
define command {
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$
}
define command {
command_name dhcp_free_address
command_line perl $USER1$/check_dhcp_addfree -H $HOSTADDRESS$ -C $USER2$ -v 2 -s $ARG1$ -c $ARG2$ -w $ARG3$
}
define command {
command_name win_services
command_line $USER1$/check_snmp_win.pl -H $HOSTADDRESS$ -C $USER2$ -n $ARG1$
}
define command {
command_name partitions-netasq
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $USER2$ -m /dev -e -w $ARG1$ -c $ARG2$ -S 0 -q FixedDisk
}
define command {
command_name emc_check
command_line $USER1$/check_emc_clariion.pl -H $HOSTADDRESS$ -u $USER4$ -p $USER5$ -t $ARG1$
}
define command {
command_name aix_process
command_line $USER1$/check_aix_process.pl -H $HOSTADDRESS$ -C $USER2$ -n $ARG1$ -2
}
define command {
command_name nokia_vrrp
command_line perl $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ -C $USER2$ -T nokia -s $ARG1$
}
define command {
command_name snmp_int
command_line perl $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $USER2$ -n $ARG1$
}
define command {
command_name aix_swap
command_line $USER1$/check_aix_swap -H $HOSTADDRESS$ -C $USER2$ -w $ARG1$ -c $ARG2$
}
define command {
command_name aix4_disk
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios_plugins/check_disk -m -x /mnt/nfsgema2 -w 2% -c 1%' -i /home/nagios/.ssh/id_rsa -l nagios
}
define command {
command_name aix4_load
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios_plugins/check_load -w 8,8,8 -c 12,12,12' -i /home/nagios/.ssh/id_rsa -l nagios
}
define command {
command_name brocade_status
command_line $USER1$/check_FCBrocade_hardware.sh -H $HOSTADDRESS$ -c public
}
define command {
command_name nslookup
command_line $USER1$/check_dns -H $ARG1$ -w $ARG2$ -c $ARG3$
}
define command {
command_name linux_swap
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $USER2$ -m Swap -w $ARG1$ -c $ARG2$
}
define command {
command_name check_mysql
command_line $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}
define command {
command_name check_ssh
command_line $USER1$/check_ssh -H $HOSTADDRESS$
}
define command {
command_name uptime_public
command_line $USER1$/check_snmp_uptime.pl -H $HOSTADDRESS$ -C public -w $ARG1$ -c $ARG2$
}
define command {
command_name uptime
command_line $USER1$/check_snmp_uptime.pl -H $HOSTADDRESS$ -C $USER2$ -w $ARG1$ -c $ARG2$
}
define command {
command_name network_env
command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ -C $USER2$ -T $ARG1$
}
define command {
command_name oracle_ssh_pmon
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios_plugins/check_oracle --db $ARG1$' -i /home/nagios/.ssh/id_rsa -l nagios
}
define command {
command_name oracle_ssh_tbs
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios_plugins/check_oracle_tablespace.sh -s $ARG1$ -w $ARG2$ -c $ARG3$ -a' -i /home/nagios/.ssh/id_rsa -l nagios
}
define command {
command_name dell_status
command_line $USER1$/check_openmanage -H $HOSTADDRESS$ -C $USER2$
}
define command {
command_name systime
command_line $USER1$/check_systime.pl -H $HOSTADDRESS$ -C $USER2$ -n $ARG1$
}
define command {
command_name eon_service_notifier
command_line /srv/eyesofnetwork/notifier/bin/notifier.pl -t service -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -s "$SERVICEDESC$" -e "$SERVICESTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$SERVICEOUTPUT$" -A "$HOSTGROUPNAMES$" -B "$SERVICEGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$SERVICENOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
}
define command {
command_name eon_host_notifier
command_line /srv/eyesofnetwork/notifier/bin/notifier.pl -t host -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -e "$HOSTSTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$HOSTOUTPUT$" -A "$HOSTGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$HOSTNOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
}
define command {
command_name check_int_traffic
command_line $USER1$/check_int_traffic.pl -H $HOSTADDRESS$ -C $USER2$ $ARG1$
}
define command {
command_name check_disk
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $USER2$ -m $ARG1$ -w $ARG2$ -c $ARG3$ -S 0 -q FixedDisk -f
}
define command {
command_name cisco_cpu
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C $USER2$ -2 -T cisco -w $ARG1$ -c $ARG2$ -f
}
define command {
command_name notify-by-email-host-old
command_line /usr/bin/printf "%b" "***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
define command {
command_name notify-by-email-service-old
command_line /usr/bin/printf "%b" "***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$" | /bin/mail -s "Services $SERVICESTATE$ alert for $HOSTNAME$/$SERVICEDESC$!" $CONTACTEMAIL$
}
define command {
command_name check_service_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c service
}
define command {
command_name check_swap_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c swap -a $ARG1$ $ARG2$
}
define command {
command_name check_disk_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c root_disk -a $ARG1$
}
define command {
command_name check_memory_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c memory -a $ARG1$ $ARG2$
}
define command {
command_name check_cpu_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c cpu -a $ARG1$ $ARG2$
}
Only web gui of eon have been used.
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:15 am
by scottwilkerson
I've never seen this "EON" before and it is not made by us, but may use Nagios under the hood. Unfortunately I don't know where to tell you to look other than where you configure the "Check CPU" service, I'm looking for the command_name and $ARG1$ values listed on that page
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:19 am
by liberodark
Have send you the cfg sorry for time.
Code: Select all
define command {
command_name check_cpu_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c cpu -a $ARG1$ $ARG2$
}
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:22 am
by scottwilkerson
That's the config for the command, I'm looking for the config for the service
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:24 am
by liberodark
So sorry is on /etc/nagios ?
Code: Select all
ls -lha
total 24K
drwxrwxr-x. 3 nagios eyesofnetwork 74 19 mars 09:42 .
drwxr-xr-x. 87 root root 8,0K 25 mars 15:43 ..
-rwxrwxr-x. 1 nagios eyesofnetwork 621 25 mars 16:27 cgi.cfg
-rwxrwxr-x. 1 nagios eyesofnetwork 3,5K 25 mars 16:27 nagios.cfg
drwxrwxr-x. 5 nagios eyesofnetwork 199 19 mars 09:42 objects
-rwxrwxr-x. 1 nagios eyesofnetwork 232 25 mars 16:27 resource.cfg
Im use two services template :
This for all command with no Graphic :
Code: Select all
define service {
register 0
name GENERIC_SERVICE
max_check_attempts 4
check_interval 4
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 0
check_freshness 0
freshness_threshold 0
notification_interval 0
notification_period 24x7
notifications_enabled 1
notification_options w,u,c,r,f,s
}
This is for Check CPU :
Code: Select all
define service {
register 0
use GENERIC_SERVICE
name GENERIC_GRAPH
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
notification_options n
}
Re: Debian not work with NRPE $ARG$
Posted: Tue Mar 26, 2019 8:32 am
by scottwilkerson
getting closer
My guess is it is in the /etc/nagios/objects folder, lets try to find the file by running
Code: Select all
grep "Check CPU" -R /etc/nagios/objects