Had a drive issue seem to have lost all configurations.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

Had a drive issue seem to have lost all configurations.

Post 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?
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

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

Post 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?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

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

Post 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)
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

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

Post by jladd »

Is this the correct table? any ideas on this do I just have to start over?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

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

Post 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.
Nicholas Scott
Former Nagios employee
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

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

Post 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?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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.
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

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

Post 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?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

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

Post by nscott »

You shouldn't need to. Do you have a /etc/nagiosql/backup ?
Nicholas Scott
Former Nagios employee
jladd
Posts: 70
Joined: Fri Jan 22, 2010 11:30 am

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

Post 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.
Locked