nagios taking too long to start

shadih rahman shadhin71 at gmail.com
Fri Aug 7 17:09:38 CEST 2009


Hi,
   I have sizeable installation of nagios server.  I have two server with
failover setup.  Since I am using ndo, my server takes a long time to start
up.  While my primary servers doing initial insertion and deletion, my
backup thinks primary is not in service so it starts notifications instead
of primary.

   I am trying to see how I can resolve this issue.  I have downloaded the
newer version of ndo but it did not help.  I think it has to do with my
indexing.  I have read the following thread which talks about reducing the
table size by lowering the retention time.

http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg23938.html

  However my requirement is that I have to keep most of hostchecks,
servicechecks and events for longtime.  Also, in another post Jim Avery
mentioned the following.

  innodb_flush_log_at_trx_commit = 2

What does innodb flush means when it comes to master-master replication
between primary and secondary. Please advise on this.  Thanks




Following are my current indexes --

mysql> show indexes from nagios_objects;
+----------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| Table          | Non_unique | Key_name      | Seq_in_index | Column_name
| Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment
|
+----------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| nagios_objects |          0 | PRIMARY       |            1 | object_id
| A         |       26095 |     NULL | NULL   |      | BTREE      |
|
| nagios_objects |          1 | objecttype_id |            1 | objecttype_id
| A         |           3 |     NULL | NULL   |      | BTREE      |
|
| nagios_objects |          1 | objecttype_id |            2 | name1
| A         |       26095 |     NULL | NULL   |      | BTREE      |
|
| nagios_objects |          1 | objecttype_id |            3 | name2
| A         |       26095 |     NULL | NULL   | YES  | BTREE      |
|
+----------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
4 rows in set (0.01 sec)



mysql> show indexes from nagios_hostchecks;
+-------------------+------------+-------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+
| Table             | Non_unique | Key_name    | Seq_in_index |
Column_name     | Collation | Cardinality | Sub_part | Packed | Null |
Index_type | Comment |
+-------------------+------------+-------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+
| nagios_hostchecks |          0 | PRIMARY     |            1 |
hostcheck_id    | A         |    12532724 |     NULL | NULL   |      |
BTREE      |         |
| nagios_hostchecks |          0 | instance_id |            1 |
instance_id     | A         |          16 |     NULL | NULL   |      |
BTREE      |         |
| nagios_hostchecks |          0 | instance_id |            2 |
host_object_id  | A         |          16 |     NULL | NULL   |      |
BTREE      |         |
| nagios_hostchecks |          0 | instance_id |            3 |
start_time      | A         |    12532724 |     NULL | NULL   |      |
BTREE      |         |
| nagios_hostchecks |          0 | instance_id |            4 |
start_time_usec | A         |    12532724 |     NULL | NULL   |      |
BTREE      |         |
+-------------------+------------+-------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+
5 rows in set (0.14 sec)


mysql> show indexes from nagios_servicechecks;
+----------------------+------------+-------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
| Table                | Non_unique | Key_name    | Seq_in_index |
Column_name       | Collation | Cardinality | Sub_part | Packed | Null |
Index_type | Comment |
+----------------------+------------+-------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
| nagios_servicechecks |          0 | PRIMARY     |            1 |
servicecheck_id   | A         |    19555522 |     NULL | NULL   |      |
BTREE      |         |
| nagios_servicechecks |          0 | instance_id |            1 |
instance_id       | A         |          17 |     NULL | NULL   |      |
BTREE      |         |
| nagios_servicechecks |          0 | instance_id |            2 |
service_object_id | A         |          17 |     NULL | NULL   |      |
BTREE      |         |
| nagios_servicechecks |          0 | instance_id |            3 |
start_time        | A         |    19555522 |     NULL | NULL   |      |
BTREE      |         |
| nagios_servicechecks |          0 | instance_id |            4 |
start_time_usec   | A         |    19555522 |     NULL | NULL   |      |
BTREE      |         |
+----------------------+------------+-------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
5 rows in set (0.32 sec)




 show indexes from nagios_timedevents;
+--------------------+------------+-------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+
| Table              | Non_unique | Key_name    | Seq_in_index |
Column_name    | Collation | Cardinality | Sub_part | Packed | Null |
Index_type | Comment |
+--------------------+------------+-------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+
| nagios_timedevents |          0 | PRIMARY     |            1 |
timedevent_id  | A         |           0 |     NULL | NULL   |      |
BTREE      |         |
| nagios_timedevents |          0 | instance_id |            1 |
instance_id    | A         |           0 |     NULL | NULL   |      |
BTREE      |         |
| nagios_timedevents |          0 | instance_id |            2 |
event_type     | A         |           0 |     NULL | NULL   |      |
BTREE      |         |
| nagios_timedevents |          0 | instance_id |            3 |
scheduled_time | A         |           0 |     NULL | NULL   |      |
BTREE      |         |
| nagios_timedevents |          0 | instance_id |            4 |
object_id      | A         |           0 |     NULL | NULL   |      |
BTREE      |         |
+--------------------+------------+-------------+--------------+----------------+-----------+-------------+----------+--------+------+------------+---------+
5 rows in set (0.00 sec)







-- 
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090807/39b4eaf6/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
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