Hi,everybody:
In /usr/local/nagios/etc/objects/ I created hosts.cfg and services.cfg
But I found one question: I can't define one more host,but I need to minitor 7 linux_hosts in my company.
HOW CAN I DEFINE ONE MORE LINUX by modifying hosts.cfg and services.cfg?
THX THX THX!!!!
It's the hosts.cfg:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
define host{
use linux-server
host_name xianyuan-Linux
alias xianyuan-Linux
address 192.168.1.9
}
define hostgroup{
hostgroup_name hanminfo-servers
alias hanminfo servers
members xianyuan-Linux
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
it's the service.cfg
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
define service{
use local-service
host_name xianyuan-Linux
service_description Current Load
check_command check_nrpe!check_load
}
define service{
use local-service
host_name xianyuan-Linux
service_description Check Disk sda1
check_command check_nrpe!check_sda1
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
nagios_objects
Re: nagios_objects
Hi Volcharge,Volcharge wrote:Hi,everybody:
In /usr/local/nagios/etc/objects/ I created hosts.cfg and services.cfg
But I found one question: I can't define one more host,but I need to minitor 7 linux_hosts in my company.
HOW CAN I DEFINE ONE MORE LINUX by modifying hosts.cfg and services.cfg?
THX THX THX!!!!
It's the hosts.cfg:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
define host{
use linux-server
host_name xianyuan-Linux
alias xianyuan-Linux
address 192.168.1.9
}
define hostgroup{
hostgroup_name hanminfo-servers
alias hanminfo servers
members xianyuan-Linux
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
it's the service.cfg
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
define service{
use local-service
host_name xianyuan-Linux
service_description Current Load
check_command check_nrpe!check_load
}
define service{
use local-service
host_name xianyuan-Linux
service_description Check Disk sda1
check_command check_nrpe!check_sda1
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
You can add as many
Code: Select all
define host{
use linux-server
host_name something
alias something
address so.me.ip.addr
}
Code: Select all
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/something.cfg
cfg_file=/usr/local/nagios/etc/objects/whatever.cfg
cfg_file=/usr/local/nagios/etc/objects/somethingelse.cfg
cfg_file=/usr/local/nagios/etc/objects/supertopsecretawesomehosts.cfg
Former Nagios Employee.
me.
me.