Nsclient++ Check_Mem
Re: Nsclient++ Check_Mem
Anyone know how to change the ok, the status information and put something like: Memory usage: total: 3838.52 Mb - used: 1178.90 Mb (31%) - free: 2659.61 Mb (69%)
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nsclient++ Check_Mem
That change would have to be made to the plugin that is running the check, as that is what is responsible for this status output.
Re: Nsclient++ Check_Mem
know where is this plugin to make the necessary changes?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nsclient++ Check_Mem
The plugin is likely check_nt. This is a compiled c program, so you will need to find the source code from our nagios-plugins github account or write a wrapper script to call instead and alter it.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Nsclient++ Check_Mem
I'm using the alias of NSClient + +, would not use the nrpe make make the query to a windows server:
My configuracion:
define service{
use generic-service
host_name teste
service_description Memory
check_command check_nrpe!alias_mem
}
But a teste:
In commands.cfg
define command {
command_name check_mem
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c CheckMem -a type=physical MaxWarn=$ARG1$ MaxCrit=$ARG2$ ShowAll=long
}
In test.cfg
define service{
use generic-service
host_name test
service_description RAMss
check_command check_mem
}
But nagios display: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
My configuracion:
define service{
use generic-service
host_name teste
service_description Memory
check_command check_nrpe!alias_mem
}
But a teste:
In commands.cfg
define command {
command_name check_mem
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c CheckMem -a type=physical MaxWarn=$ARG1$ MaxCrit=$ARG2$ ShowAll=long
}
In test.cfg
define service{
use generic-service
host_name test
service_description RAMss
check_command check_mem
}
But nagios display: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nsclient++ Check_Mem
OK, so you are using check_nrpe, it is still a compiled c program and the source would need to be modified or a wrapper script created to call it and then alter the output. If you wish to look at the source, it is on our sourceforge account for nrpe(included with the linux daemon)
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Nsclient++ Check_Mem
to be able to use the command check_mem have to create a script?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nsclient++ Check_Mem
No, likely you just need to enable it on your nsclient system. Could you post your nsc.ini please? Also run:
Code: Select all
nmap -p 5666 [host\IP of nsclient system]Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Nsclient++ Check_Mem
I have Nsclien++ 4.2.8
Nmap result:
Starting Nmap 5.21 ( http://nmap.org ) at 2014-03-11 16:04 WET
Nmap scan report for 192.168.1.218
Host is up (0.00093s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
Nmap result:
Starting Nmap 5.21 ( http://nmap.org ) at 2014-03-11 16:04 WET
Nmap scan report for 192.168.1.218
Host is up (0.00093s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nsclient++ Check_Mem
Is that the only nsclient/nsc.ini file in your installation directory? That looks like a sample.