Search found 9 matches

by m0le121
Tue Aug 18, 2015 6:20 am
Forum: Open Source Nagios Projects
Topic: Check Peers script: wrong output nagios
Replies: 4
Views: 2804

Re: Check Peers script: wrong output nagios

it is fixed now. Thanks for your answer. the most imporant: sudo /usr/sbin/asterisk -rx "sip show peers" instead of asterisk -rx "sip show peers" code (in dutch): #!/bin/bash # # Date: 18-08-2015 # Description: Check peers # melding=0; users=""; COUNT_NOT_OK=$(sudo /usr...
by m0le121
Tue Aug 18, 2015 3:34 am
Forum: Open Source Nagios Projects
Topic: Check Peers script: wrong output nagios
Replies: 4
Views: 2804

Re: Check Peers script: wrong output nagios

Root user:

Code: Select all

[root@... ~]
melding: 2
Problems
Nagios user:

Code: Select all

[nagios@... ~]
melding: 0
ok.
the problem is somewhere in melding.
by m0le121
Mon Aug 17, 2015 3:56 am
Forum: Open Source Nagios Projects
Topic: Check Peers script: wrong output nagios
Replies: 4
Views: 2804

Check Peers script: wrong output nagios

output in nagios is diffrent. Nagios output is always: ok. when i run the script manualy: Problems vogels: 0/ 10 tijhuis: 0/ 3 sh: 0/ 19 below the script: #!/bin/bash # # Description: Check peers # melding=0; COUNT_NOT_OK=$(asterisk -rx "sip show peers" | grep "Lagged\|UNREACHABLE\|UN...
by m0le121
Thu Jul 23, 2015 4:47 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

Re: service firewall check

Good news it works now :D On the client side i did: sudoedit /etc/sudoers #Nagios user Defaults:nrpe !authenticate nrpe ALL=/sbin/service firewall status nrpe ALL = (root) NOPASSWD:/sbin/iptables -L -n Defaults:nrpe !requiretty #Nagios user Defaults:nagios !authenticate nagios ALL=/sbin/service fire...
by m0le121
Tue Jun 16, 2015 2:14 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

Re: service firewall check

on client: [root@name~]# /etc/init.d/firewall status firewall is running [root@name~]# service firewall stop Deleting firewall packet filter [ OK ] [root@name~]# /etc/init.d/firewall status firewall is stopped [root@name~]# service firewall start Installing Firewall packet filter WARNING: All confi...
by m0le121
Mon Jun 15, 2015 5:27 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

Re: service firewall check

edit on the nagios client I changed the code to: #!/bin/bash SERVICE=firewall; T1=$(sudo /etc/init.d/$SERVICE status) RUNNING="$SERVICE is running" STOPPED="$SERVICE is stopped" UNKNOWN="$SERVICE is unknown" if [ "$T1" = "$RUNNING" ]; then echo &quo...
by m0le121
Tue Jun 09, 2015 4:56 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

Re: service firewall check

sorry i mean:

Code: Select all

 /usr/lib64/nagios/plugins/check_nrpe -H externalip.com -c firewall_check
by m0le121
Mon Jun 08, 2015 3:15 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

Re: service firewall check

i added the code below on the nagios client. vi /etc/sudoers nagios ALL=NOPASSWD:/etc/init.d/firewall status i edit my script with the following line: status="sudo /etc/init.d/$SERVICE status" i added the code below on the nagios server. vi /etc/nagios/cgi.cfg authorized_for_read_only=nagi...
by m0le121
Fri Jun 05, 2015 7:19 am
Forum: Open Source Nagios Projects
Topic: service firewall check
Replies: 13
Views: 5638

service firewall check

i had a problem with the check of the code below. The code has the name firewall_check.sh on the client. When i run firewall_check.sh on the client it works correctly (it says running or not running). #!/bin/bash SERVICE=firewall; status="/etc/init.d/$SERVICE status" if $status | grep &quo...