Importing nagios core log files into XI
Importing nagios core log files into XI
Hi Guys,
How can we import our old nagios core log files into nagiosXI?
After copying these log files in /usr/local/nagios/var/archives dir, i can see old log entries in Nagios Core Availabity Report but not in NagiosXI Event Log or Host/Service History
Thanks
How can we import our old nagios core log files into nagiosXI?
After copying these log files in /usr/local/nagios/var/archives dir, i can see old log entries in Nagios Core Availabity Report but not in NagiosXI Event Log or Host/Service History
Thanks
Re: Importing nagios core log files into XI
The log files need to be imported into the database. There is no way to do this directly from the Nagios XI web interface. I've seen scripts that can do this. You may need to browse the Nagios Exchange or search on Google for a script that can do the job for you. Before making any changes, do proper backup.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Importing nagios core log files into XI
Hi guys,
Could you please give me more details about this?
Can you recommend a procedure to import nagios core history into XI.
Thanks in advance for your response.
BRegards
Could you please give me more details about this?
Can you recommend a procedure to import nagios core history into XI.
Thanks in advance for your response.
BRegards
Re: Importing nagios core log files into XI
You should be able to use log2ndo to do this:
Code: Select all
/usr/local/nagios/bin/log2ndo /path/to/log/file -d /usr/local/nagios/var/ndo.sock -i "localhost" Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Importing nagios core log files into XI
hi support,
I ran this command several times:
/usr/local/nagios/bin/log2ndo -s /usr/local/nagios/var/archives/nagios-*-2008-00.log -d /usr/local/nagios/var/ndo.sock -i "localhost"
Now i am getting these errors in /var/log/messages:
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
...
I ran this command several times:
/usr/local/nagios/bin/log2ndo -s /usr/local/nagios/var/archives/nagios-*-2008-00.log -d /usr/local/nagios/var/ndo.sock -i "localhost"
Now i am getting these errors in /var/log/messages:
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
Nov 14 14:44:09 torvir01u ndo2db: Error: queue recv error.
...
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Importing nagios core log files into XI
Are you getting any sql query errors in your syslog as well? "ndo2db: Error: queue recv error" is typically surrounded by them. Did you also import the last (current) nagios log? I would not have done that necessarily, if you did, are the times on the two systems in sync?
Re: Importing nagios core log files into XI
I didn't found any sql error in logs and i didn't try to import the current nagios.log
I would like to import all nagios historical logfiles collected from 06/2008 to the date of the installazione of our nagiosXI.
I would like to import all nagios historical logfiles collected from 06/2008 to the date of the installazione of our nagiosXI.
Re: Importing nagios core log files into XI
What is the output of:
Code: Select all
grep "mysql\|ndo2db" /var/log/messages
tail -25 /var/log/mysqld.logFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Importing nagios core log files into XI
[root@nagiosxi ~]# grep "mysql\|ndo2db" /var/log/messages
Nov 14 12:43:51 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 13:39:37 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
...
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:09 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 16:47:51 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
---------------------------------
The following logs in mysql.log aren't related to the above issue
root@nagiosxi ~]# tail -25 /var/log/mysqld.log
141110 12:33:12 [Note] Event Scheduler: Purging the queue. 0 events
141110 12:33:14 InnoDB: Starting shutdown...
141110 12:33:15 InnoDB: Shutdown completed; log sequence number 0 44233
141110 12:33:15 [Note] /usr/libexec/mysqld: Shutdown complete
141110 12:33:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141110 12:49:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141110 12:49:04 InnoDB: Initializing buffer pool, size = 8.0M
141110 12:49:04 InnoDB: Completed initialization of buffer pool
141110 12:49:04 InnoDB: Started; log sequence number 0 44233
141110 12:49:04 [Note] Event Scheduler: Loaded 0 events
141110 12:49:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
-------------------
Thanks for your help
Nov 14 12:43:51 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 13:39:37 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 13:46:03 tor1vir0119u ndo2db: Error: queue recv error.
...
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:03 tor1vir0119u ndo2db: Error: queue recv error.
Nov 14 14:48:09 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
Nov 14 16:47:51 tor1vir0119u nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters
---------------------------------
The following logs in mysql.log aren't related to the above issue
root@nagiosxi ~]# tail -25 /var/log/mysqld.log
141110 12:33:12 [Note] Event Scheduler: Purging the queue. 0 events
141110 12:33:14 InnoDB: Starting shutdown...
141110 12:33:15 InnoDB: Shutdown completed; log sequence number 0 44233
141110 12:33:15 [Note] /usr/libexec/mysqld: Shutdown complete
141110 12:33:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141110 12:49:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141110 12:49:04 InnoDB: Initializing buffer pool, size = 8.0M
141110 12:49:04 InnoDB: Completed initialization of buffer pool
141110 12:49:04 InnoDB: Started; log sequence number 0 44233
141110 12:49:04 [Note] Event Scheduler: Loaded 0 events
141110 12:49:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
-------------------
Thanks for your help
Re: Importing nagios core log files into XI
You will probably need to clear the ndo queue:
And tune message queue parameters:
See the following faq entry (old but still relevant):
http://support.nagios.com/wiki/index.ph ... 3.x_Issues
Code: Select all
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done Code: Select all
kernel.msgmnb
kernel.msgmax
kernel.msgmni http://support.nagios.com/wiki/index.ph ... 3.x_Issues
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.