Hi,
i have below customized command, when i add this command manually in /usr/local/nagios/etc/commands.cfg, After i restart nagios service the command will disappearing. Could you please let me know where i should add this command..?
define command {
command_name check_ws_jmxTC88
command_line $USER1$/check_jmx -U service:jmx:rmi:///jndi/rmi://x.x.x.x:9192/jmxrmi -O "java.lang:type=Threading" -A ThreadCount
}
Thanks,
Sudhakar Aguri
How to add Manually command in Nagiosxi
-
anguri.sudhakar
- Posts: 22
- Joined: Tue Dec 01, 2015 6:00 am
Re: How to add Manually command in Nagiosxi
You should be adding it inside of the core configuration manager instead of interacting with the flat files directly. The flat files get overwritten every time a configuration is applied.
Former Nagios Employee.
me.
me.
Re: How to add Manually command in Nagiosxi
You should be able to create a file with the new command in the import dir, and run the reconfig script, or click reconfig in CCM and Nagios will import it...
Re: How to add Manually command in Nagiosxi
To expand on what @gormank is saying, we have a document detailing this here. Probably a little more information than you need in that document, but still nice to be aware of.
Former Nagios Employee.
me.
me.
-
anguri.sudhakar
- Posts: 22
- Joined: Tue Dec 01, 2015 6:00 am
Re: How to add Manually command in Nagiosxi
Thanks you i will try and let know.....
Re: How to add Manually command in Nagiosxi
I'll leave this open - let us know if you have any questions.
Former Nagios Employee