Storing data in MySQL

Marc Powell marc at ena.com
Fri Feb 18 14:43:06 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of first last
> Sent: Friday, February 18, 2005 12:43 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Storing data in MySQL
> 
> Hi,
> 
> I am running nagios 1.2 with mysql support on FC3.  When I click on
the
> "trend" option on the webpage.  I can see graphs for my services.
There
> are services that I have ran for more than 2 weeks, but the graph show
me
> data that starts from this week only even though the day range I pick
is
> for this month.  Worst yet, the graph sometimes is blank.   I am
wondering
> where do those data store?  I can't see any of them in the mysql db.
I
> tried to querry the mysql db and all I really see are data from the
last
> check.  Where do the historical data store or does it store at all?

/path/to/nagios/var/archives/ if you've installed from tarball. The
database is only designed to hold last checks. Historical information is
kept in flat files.

> 
> When I click the "availability" option and set the "first assumed
state"
> to "State OK"  I see the services are in the OK state 99.9%, but when
I
> change teh "assumed state" to "State Critical", the OK state changes
to
> 60% and suddenly teh Critical State becomes 39%.  I am trying to
> understand nagios more.

The two key bits of information here are that nagios typically only logs
state changes and that it will not lie to you on the availability
reports. If you run an availability report for a period of one month for
a service that was down the last half of the month, Nagios will show the
first half of the month as undetermined and the last half of the month
as critical unless it can determine the exact state of the service at
the beginning of the report period. The first assumed state option is a
way of telling nagios that you know that at the beginning of the report
period that the service was in X state. You can also use the backtracked
archives option to increase the chances that nagios will find a logged
state for your service further back in time to use as an initial
starting state. You can also set log_initial_states=1 in nagios.cfg and
perform nightly reloads of the service to log current states of all
hosts and services on a daily basis.

http://www.nagios.org/faqs/viewfaq.php?faq_id=136&expand=false&showdesc=
false

> 
> At last what is the differnet between "soft" and "hard" state?  My
> understanding from the document is when a service flip between say
> "Warning" and "Critical", it is in soft state because it is flapping.
If
> it states in "Critical", that is a hard state.  Is this correct?

Basically, a soft state is used when a service or host check has not yet
reached max_check_attempts. Additional processing happens for hosts and
services when they are in a soft state. A hard state is used when it
has.

http://nagios.sourceforge.net/docs/1_0/statetypes.html



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&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