Nagios – memory configuration

memorynagios

I am trying to configure nagios to perform memory check on a ubuntu server. I already have the basic configuration but when a try to start nagios, the following error message is displayed:

Service check command 'check_mem' specified in service 'Current Memory Usage' for host 'xxxx' not defined anywhere!

Besides commands.cfg, is there any possible place to define the command to be executed?

Thanks in advance,
Best regards!

Best Answer

Rui:

ok, that's much clearer. The answer is that NAGIOS can take any valid configuration statement in any of its configuration files, and there can be an unlimited number of these. I have a NAGIOS server with 136 config files; any of those could contain a command definition.

So if you have a running configuration that has it defined somewhere, but not in commands.cfg, then the bad news is it could be in any of its config files, and these can be anywhere.

If I wanted to find it, I'd look in nagios.cfg to see what directories the config files live in, then automate the process of finding it, perhaps with

find /config/directory1 /config/directory2 /you-get-the-idea  -type f -exec grep check_mem {} /dev/null \;

and see what matches that finds.

Related Topic