Lost history...
Marc Powell
marc at ena.com
Fri Feb 20 22:03:44 CET 2004
On Friday, February 20, 2004 12:04 PM, Christiaan Ehlers shared with us:
> Hi All
>
> We are currently monitoring a whole bunch of IP phones with nagios.
> We have a php scripts that runs and drags the new IP phones off a
> LDAP DB, it then formats them and then adds them to files called
> base_hosts, base_hostgroups and base_services file. These base files
> contain the "static" hosts (servers and other hosts that don't
> change). Thus base files + ouput from the php script = *.cfg. The
> output of the php just gets redirected (>) into the cfg file.
>
> There is a normal shell script that runs the phps and then restarts
> the nagios service (service nagios restart); the script is run by
> cron every mid-night.
How the config files are generated is irrelevant in this case as long
as:
a) nagios doesn't complain about their format. It sounds like
they're fine.
b) host_name's aren't changing every time they're generated.
Nagios uses the host_name to search it's archived log files. If the host
name is changing all the time, it doesn't have any idea what it was
previously so the device would have no history. That may or may not be
applicable.
>
> The problem is that we are not retaining history on anything. I
> might understand if the phones don't contain history but not even the
> machines specified in the base files have history.
>
> What am I doing wrong? I am running nagios ver 1.1.
Have you looked at the archived log files themselves to see if there is
data in them? All the history is stored in the log files which are then
searched by the CGI's. The log_archive_path variable in nagios.cfg
should point to their location. It's usually
/usr/local/nagios/var/archives. Another problem could be if the archived
log files were not readable by your web server. You will also have
problems if you switch the log_rotation_method. Was that done recently?
Nagios also doesn't store the results for every single check. It
typically only logs when a device or service changes state. Take a look
at the log_* variables in nagios.cfg to get an idea of what Nagios can
log.
--
Marc
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
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