Page 1 of 2

Had a drive issue seem to have lost all configurations.

Posted: Tue Jun 14, 2011 4:45 pm
by jladd
Im not 100% sure what happed but on my nagios xi install we started to get errors and when I came into work one Saturday the system would not boot up giving hard disk errors. Got that resolved and the server back up but when i tried to login was getting incorrect password errors so I decided to recover from a backup which after this I was now able to login using my old login information but now the only thing showing up in the hosts/services is the local host none of my hosts are showing up now?

Re: Had a drive issue seem to have lost all configurations.

Posted: Wed Jun 15, 2011 9:34 am
by tonyyarusso
How old was the backup? What format was it? (Full disk, file level, database dump) Can you see anything besides localhost in the `nagiosql` database in MySQL?

Re: Had a drive issue seem to have lost all configurations.

Posted: Wed Jun 15, 2011 4:39 pm
by jladd
The backup was from backup script in nagios xi I modified it to save everything to a different drive so when i look at the zip file its 16.6 MB and it says its from december 2010 which im not sure if thats right even if it is the configuration hasn't changed since then.

As for looking through the database I'm not that good with sql But in the nagiosql database and in the tbl_host table I have this Im not sure if this is the correct table?

Code: Select all

 SELECT * FROM tbl_host;
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
| id | host_name | alias     | display_name | address   | parents | parents_tploptions | hostgroups | hostgroups_tploptions | check_command | use_template | use_template_tploptions | initial_state | max_check_attempts | check_interval | retry_interval | active_checks_enabled | passive_checks_enabled | check_period | obsess_over_host | check_freshness | freshness_threshold | event_handler | event_handler_enabled | low_flap_threshold | high_flap_threshold | flap_detection_enabled | flap_detection_options | process_perf_data | retain_status_information | retain_nonstatus_information | contacts | contacts_tploptions | contact_groups | contact_groups_tploptions | notification_interval | notification_period | first_notification_delay | notification_options | notifications_enabled | stalking_options | notes | notes_url | action_url | icon_image | icon_image_alt | vrml_image | statusmap_image | 2d_coords | 3d_coords | use_variables | name | active | last_modified       | access_rights | config_id |
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
|  1 | localhost | localhost |              | 127.0.0.1 |       0 |                  2 |          0 |                     2 | NULL          |            1 |                       2 |               |               NULL |           NULL |           NULL |                     2 |                      2 |            0 |                2 |               2 |                NULL |             0 |                     2 |               NULL |                NULL |                      2 |                        |                 2 |                         2 |                            2 |        0 |                   2 |              0 |                         2 |                  NULL |                   0 |                     NULL |                      |                     2 |                  |       |           |            |            |                |            |                 |           |           |             1 |      | 1      | 2010-12-04 09:37:24 | NULL          |         1 |
+----+-----------+-----------+--------------+-----------+---------+--------------------+------------+-----------------------+---------------+--------------+-------------------------+---------------+--------------------+----------------+----------------+-----------------------+------------------------+--------------+------------------+-----------------+---------------------+---------------+-----------------------+--------------------+---------------------+------------------------+------------------------+-------------------+---------------------------+------------------------------+----------+---------------------+----------------+---------------------------+-----------------------+---------------------+--------------------------+----------------------+-----------------------+------------------+-------+-----------+------------+------------+----------------+------------+-----------------+-----------+-----------+---------------+------+--------+---------------------+---------------+-----------+
1 row in set (0.00 sec)

Re: Had a drive issue seem to have lost all configurations.

Posted: Fri Jun 17, 2011 4:41 pm
by jladd
Is this the correct table? any ideas on this do I just have to start over?

Re: Had a drive issue seem to have lost all configurations.

Posted: Mon Jun 20, 2011 12:54 pm
by nscott
It looks like the only host in the table is localhost. Is that even showing up? That table *should* be populated with all of your hosts.

Re: Had a drive issue seem to have lost all configurations.

Posted: Tue Jun 21, 2011 3:12 pm
by jladd
Yes local host is the only host showing up. I have the nagios backup file which is in zip format is there anything I need to look for in there maybe manually copy a file over to make sure it goes to the correct location?

Re: Had a drive issue seem to have lost all configurations.

Posted: Tue Jun 21, 2011 4:44 pm
by mguthrie
Do you have any of your old configuration snapshots, or config backups of your /usr/local/nagios/etc directory? If you do, you could import the object configuration files back into the Core Config Manager. Right now you're definitely missing everything but localhost.

Re: Had a drive issue seem to have lost all configurations.

Posted: Sat Jun 25, 2011 6:35 am
by jladd
Bah I looked there and its a no go. I looked through the zip file that the backup process makes and the only thing listed was local host again. Not sure why my backup only had local host this is just the default backup script that i used in nagiosxi does it only backup local host data and i need to modify it to do more?

Re: Had a drive issue seem to have lost all configurations.

Posted: Mon Jun 27, 2011 11:07 am
by nscott
You shouldn't need to. Do you have a /etc/nagiosql/backup ?

Re: Had a drive issue seem to have lost all configurations.

Posted: Mon Jun 27, 2011 4:17 pm
by jladd
nscott wrote:You shouldn't need to. Do you have a /etc/nagiosql/backup ?
Yes I have that folder but inside there is a hosts and services folder which are empty.