new to nagios, what is the command to remove a device.
No web interface
remove a Device via command line
Re: remove a Device via command line
Nagios stores its configuration in flat files, which are by default in /usr/local/nagios/etc/ you will find a whole lot of .cfg files. Inside these files will be a whole bunch of different object definitions, you need to find the host definition and remove that. It will look something like:
define host {
host_name <my hostname>
...
}
define host {
host_name <my hostname>
...
}
- inventsekar
- Posts: 37
- Joined: Fri Jul 20, 2012 11:29 am
Re: remove a Device via command line
i do had the same question at first...
As said above, Nagios just uses flat files.. We can add / remove hosts from the config file and the change takes effect, restarting/reloading is nececessary when you modify your configuration files and want those changes
to take effect.
As said above, Nagios just uses flat files.. We can add / remove hosts from the config file and the change takes effect, restarting/reloading is nececessary when you modify your configuration files and want those changes
to take effect.
-
- Posts: 1
- Joined: Tue Dec 11, 2012 12:22 am
Re: remove a Device via command line
Hi,
i am able to remove the <hostname>.cfg file however when i restart the Nagios service i get the following error > "Configuration validation failed"
If i re-enter the <hostname>.cfg file with all the contects then the service starts again.
It must be something simple but it means i am unable to remove devices.
I am new to Nagios , so any advice would be appreciated.
i am able to remove the <hostname>.cfg file however when i restart the Nagios service i get the following error > "Configuration validation failed"
If i re-enter the <hostname>.cfg file with all the contects then the service starts again.
It must be something simple but it means i am unable to remove devices.
I am new to Nagios , so any advice would be appreciated.
Re: remove a Device via command line
If you run a "/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg" it will tell you exactly why validation has failed. It's probably because another host object is dependent on or parented to that host. If you have trouble working it out, post the validation output