Page 2 of 2
Re: General config issues for Nagios3 Rashberry PI
Posted: Sun May 10, 2015 11:10 pm
by Box293
From your Nagios Pi, execute these commands and post back the results:
Code: Select all
/usr/lib/nagios/plugins/check_nt -H xxx -p 12489 -v CLIENTVERSION
/usr/lib/nagios/plugins/check_nt -H xxx -p 12489 -v UPTIME
Where xxx is the IP Address of the machine running NSClient++
Re: General config issues for Nagios3 Rashberry PI
Posted: Mon May 11, 2015 2:41 am
by nathanplatt
Results
pi@raspberrypi ~ $ /usr/lib/nagios/plugins/check_nt -H 192.168.87.83 -p 12489 -v CLIENTVERSION
pi@raspberrypi ~ $ /usr/lib/nagios/plugins/check_nt -H 192.168.87.83 -p 12489 -v UPTIME
could not fetch information from server
pi@raspberrypi ~ $
The first one didn't give me anything... could this be a port issue, our firewalls are very closed, i've requested the ports to be open but maybe that hasn't been done. Can I test the port from Nagios?
Nathan
Re: General config issues for Nagios3 Rashberry PI
Posted: Mon May 11, 2015 8:45 am
by nathanplatt
I've moved my test to a server that won't be affected by a firewall and I'm getting the same issue. Any ideas?
Re: General config issues for Nagios3 Rashberry PI
Posted: Mon May 11, 2015 11:56 am
by tgriep
Run the following from the Nagios system to see if the port is open. You will need to have nmap installed on it.
Replace xxx.xxx.xxx.xxx with the IP address of your windows system.
Also, could you post your latest nsclient.ini file?
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 12:50 am
by nathanplatt
pi@raspberrypi ~ $ nmap -p 12489 192.168.1.166
Starting Nmap 6.00 (
http://nmap.org ) at 2015-05-12 05:47 UTC
Nmap scan report for 192.168.1.166
Host is up (0.00075s latency).
PORT STATE SERVICE
12489/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.35 seconds
pi@raspberrypi ~ $
nsclient.ini
[/settings/default]
allowed hosts = 192.168.1.11/255.255.255.0
password = N0rth3dgE!
[/modules]
NSClientServer = 1
CheckSystem = 1
CheckDisk = 1
NRPEServer = 1
[/settings/NRPE/server]
use ssl = 1
payload length = 1024
allow nasty characters = false
allowed ciphers = ADH
ssl = 1
allow arguments = 1
insecure = 1
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 1:21 am
by Box293
Great I think we've found the source of your problem and there are two problems.
First, change your allowed hosts to this:
If you wanted to allow a whole class C network then you would do this:
After making that change and restarting the NSClient++ service you should be able to run this on the Nagios host:
Code: Select all
/usr/lib/nagios/plugins/check_nt -H 192.168.87.83 -p 12489 -s 'N0rth3dgE!' -v CLIENTVERSION
Which should return something like:
Now the second problem you have is with your password. The ! mark in the password will cause nagios to break, as nagios command directives use the ! to separate arguments.
Just change it in your nsclient.ini file and restart the service.
Then your command definition would be something like:
Code: Select all
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s $ARG1$ -v $ARG2$ $ARG3$
}
Then your service definition would contain the line:
Code: Select all
check_command check_nt!the_password_whatever_it_is!UPTIME
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 3:28 am
by nathanplatt
I made all those changes and I'm still getting errors, same as before no response from server. I've had a nightmare install of this as its running on a raspberry PI using the apt-get install Nagios3 and then manually installing the plugins.
Any other advice?
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 3:45 am
by nathanplatt
Correction... that has worked! Will I be able to use this for CPU monitoring and Disk space etc?
Thank you for all the help!
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 9:58 am
by jdalrymple
nathanplatt wrote:Correction... that has worked! Will I be able to use this for CPU monitoring and Disk space etc?
Thank you for all the help!
Yes. To get a basic understanding check out this:
Code: Select all
/usr/lib/nagios/plugins/check_nt --help
If you need further help with this please open a new topic. I think the problem that this thread was opened for is now solved and we should lock it. Is that OK?
Re: General config issues for Nagios3 Rashberry PI
Posted: Tue May 12, 2015 10:02 am
by nathanplatt
Yes, solved, thank you