Search found 15 matches

by Anton @ CPB
Fri Mar 23, 2018 4:04 am
Forum: Nagios Network Analyzer
Topic: NNA Alerts
Replies: 3
Views: 1152

Re: NNA Alerts

Thanks
by Anton @ CPB
Thu Mar 22, 2018 7:22 am
Forum: Nagios Network Analyzer
Topic: NNA Alerts
Replies: 3
Views: 1152

NNA Alerts

Question on NNA Alerts. I have a check on our SFTP server for traffic going out in BYTES. The check is every 5 min on NNA and sends it to XI. My question is what is the time period selected for the sum of the BYTES? The 5 minute period from the last check, ie. check happened at 15:00 so the sum is t...
by Anton @ CPB
Wed May 24, 2017 11:40 pm
Forum: Open Source Nagios Projects
Topic: EventHandler update MySQL query
Replies: 7
Views: 2414

Re: EventHandler update MySQL query

nagios@nagios:/root$ bash -x /usr/local/nagios/libexec/eventhandlers/xxxxxx $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ ++ mysql -hxxx.xxx.xxx.xxx '-eupdate DATABASE.TABLE set Value='\''On'\'' where Category='\''ExternalServices'\'' and Param='\''{FIELDNAME}'\'';' + ON= ++ mysql -hxxx.xxx.xx...
by Anton @ CPB
Wed May 24, 2017 2:11 pm
Forum: Open Source Nagios Projects
Topic: EventHandler update MySQL query
Replies: 7
Views: 2414

Re: EventHandler update MySQL query

When event handlers and check commands are executed by Nagios, they are run as the nagios user account. One test you can do is to change to the nagios user account and run your script. To do that, run the following in a shell. Fill in the macros so the combination needed to get the Value set to On ...
by Anton @ CPB
Tue May 23, 2017 11:48 pm
Forum: Open Source Nagios Projects
Topic: EventHandler update MySQL query
Replies: 7
Views: 2414

Re: EventHandler update MySQL query

Enabled, but query still not running. Service define service{ use xxxxx-service host_name apache2 service_description xxxxxxxxxxxxx check_command check_xxxxx!hostname!PortNumber event_handler xxxx_xxxx event_handler_enabled 1 register 1 } Log May 24 06:38:35 nagios nagios: SERVICE NOTIFICATION: anto...
by Anton @ CPB
Tue May 23, 2017 7:01 am
Forum: Open Source Nagios Projects
Topic: EventHandler update MySQL query
Replies: 7
Views: 2414

EventHandler update MySQL query

Good day Running a check to see if a port is open on a link; #!/bin/bash # portcheck tool SERVER=$1 PORT=$2 usage() { echo -e "\n USAGE: ./${0##*/} [host|ip] \n" exit } check_port() { local host="${SERVER}" local port="${PORT}" if nc -w 5 -z ${host-ip} ${port} 2>/dev/nu...
by Anton @ CPB
Wed Dec 02, 2015 3:47 am
Forum: Open Source Nagios Projects
Topic: check_nrpe & check_disk
Replies: 9
Views: 4746

Re: check_nrpe & check_disk

Attached is the nrpe config file from the remote server.
by Anton @ CPB
Tue Dec 01, 2015 2:38 am
Forum: Open Source Nagios Projects
Topic: Self created check - wrong info
Replies: 1
Views: 761

Self created check - wrong info

Hi I created to check a MySQL instance. The check runs fine within libexec. root@nagios:/usr/local/nagios/libexec# ./check_nprobe_mysql OK - The times are 59 sec apart root@nagios:/usr/local/nagios/libexec# But not with the check running - See attached png Herewith the check_nprobe_mysql code #!/bin...
by Anton @ CPB
Tue Dec 01, 2015 1:49 am
Forum: Open Source Nagios Projects
Topic: check_nrpe & check_disk
Replies: 9
Views: 4746

Re: check_nrpe & check_disk

How did you install NRPE? It shouldn't be running as root. I see you're not running it inside of xinetd. Your file paths may vary, but on a compile from our script, you can see how stuff is running like this: grep nrpe_user /usr/local/nagios/etc/nrpe.cfg grep nrpe_group /usr/local/nagios/etc/nrpe.c...
by Anton @ CPB
Tue Nov 10, 2015 11:34 pm
Forum: Open Source Nagios Projects
Topic: check_nrpe & check_disk
Replies: 9
Views: 4746

Re: check_nrpe & check_disk

rkennedy wrote:This might be a permission issue, can you try running the following from the remote server?

Code: Select all

su nagios
./check_disk -w 20% -c 10% -p /dev/sdc1
All services running as root.