Monitor a Linux Machine
Scott Miller
srmiller at interbel.net
Thu May 1 22:42:57 CEST 2008
I have nagios 3.x installed as per the quick install guide, and it seems to
be working fine with the default config, looking only at localhost.
Server:
Fedora Core 4
I'm having a bit of trouble setting it up to monitor another Linux machine.
I've read the docs, and it said to:
1. Create a Host Definition:
/usr/local/nagios/etc/objects/servers.cfg (owned by nagios)
define host{
use generic-host ; Inherit default values from a
template
host_name remotehost ; The name we're giving to
this host
alias Some Remote Host ; A longer name associated
with the host
address 192.168.1.50 ; IP address of the host
hostgroups allhosts ; Host groups this host is
associated with
}
2. Create Service Definitions:
/usr/local/nagios/etc/objects/servers.cfg (in same file as above)
define service{
use generic-service ; Inherit default values from a
template
host_name remotehost
service_description HTTP
check_command check_ping!200.0,20%!600.0,60%
}
I then edited nagios.cfg and inserted this line:
cfg_file=/usr/local/nagios/etc/objects/servers.cfg
When I then restart the nagios process, it fails with:
Running configuration check... CONFIG ERROR! Restart aborted. Check your
Nagios configuration.
I the comment out the cfg_file line I've inserted in the nagios.cfg file,
and it restarts just fine.
The directions say I can have the Host definition and Service definition in
any object configuration file specified by a cfg_file directive.
It's been a few years since I've messed with nagios, but I was certain there
was more to do than the above. I've read through the docs and just don't
see where I went wrong.
Anyone have any pointers or suggestions?
Thanks,
Scott Miller
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list