Notification history is blank

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Notification history is blank

Post by mejokj »

Hello,

On one of our server notification history is blank for September and on October some data is missing. Kindly help to fix the issue.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Notification history is blank

Post by cdienger »

Does it show for dates prior to September? If you try to pull just a single September day's worth of notifications, does it work?

Try repairing the database per https://assets.nagios.com/downloads/nag ... tabase.pdf.

Also optimize the php.ini per https://support.nagios.com/kb/article/n ... e-611.html.

If the above doesn't help, run this command from the XI machine to see if there is anything in the database for the month of September:

Code: Select all

echo "select * from nagios_notifications where start_time between '2020-10-01' and '2020-10-31' limit 10;" | mysql -uroot -pnagiosxi -Dnagios
The above assumes the default database is used. If you've offloaded the database and/or changed the credentials you'll need to modify this slightly. For example:

Code: Select all

echo "select * from nagios_notifications where start_time between '2020-10-01' and '2020-10-31' limit 10;" | mysql -h DBHOST -uUSERNAME -pPASSWORD -Dnagios
Do you have any backups (either Nagios or mysql) under /store/backups/? If the data is somehow missing from the database, we may be able to restore it from the backups in these directories.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Re: Notification history is blank

Post by mejokj »

Hello,

+++++++++++++++++++++++++++++++++++++++++++++++++++
echo "select * from nagios_notifications where start_time between '2020-10-01' and '2020-10-31' limit 10;" | mysql -uroot -p -Dnagios Enter password:
notification_id instance_id notification_type notification_reason object_id start_time start_time_usec end_time

end_time_usecstate output long_output escalated contacts_notified
1757610 1 1 0 14666 2020-10-22 17:20:33 3635 2020-10-22 17:20:33 57 2 (No output on stdout) stderr: connect to address 10.35.40.113 port 5666: No route to host (No output on stdout) stderr: connect to address 10.35.40.113 port 5666: No route to host 0 2
1757611 1 1 0 8769 2020-10-22 17:21:34 317622 2020-10-22 17:21:34 317687 3 NRPE: Unable to read output NRPE: Unable to read output 0 0
1757612 1 1 0 14994 2020-10-22 17:21:35 324557 2020-10-22 17:21:35 324606 2 /ifs: 944%used(13062777MB/1384189MB) (>95%) : CRITICAL /ifs: 944%used(13062777MB/1384189MB) (>95%) : CRITICAL 0 0
1757613 1 1 0 16011 2020-10-22 17:22:27 694134 2020-10-22 17:22:27 694189 2 CRITICAL: Datastore 'ddsda' {Free Space: 822.9 GB} {Free Space: 9% (CRITICAL <= 10)} {Used Space: 9,417.1 GB} {Used Space: 91%} {Capacity: 10,240 GB} CRITICAL: Datastore 'ddsda' {Free Space: 822.9 GB} {Free Space: 9% (CRITICAL <= 10)} {Used Space: 9,417.1 GB} {Used Space: 91%} {Capacity: 10,240 GB} 0 0
1757614 1 1 0 16012 2020-10-22 17:22:39 810669 2020-10-22 17:22:39 810697 2 CRITICAL: Datastore 'ddsda' {Free Space: 683.9 GB} {Free Space: 5% (CRITICAL <= 10)} {Used Space: 14,676.1 GB} {Used Space: 95%} {Capacity: 15,360 GB} CRITICAL: Datastore 'ddsda' {Free Space: 683.9 GB} {Free Space: 5% (CRITICAL <= 10)} {Used Space: 14,676.1 GB} {Used Space: 95%} {Capacity: 15,360 GB} 0 0
1757615 1 0 0 11402 2020-10-22 17:22:49 234448 2020-10-22 17:22:49 234499 1 CRITICAL - 10.33.40.196: rta nan, lost 100% CRITICAL - 10.33.40.196: rta nan, lost 100% 0 0
1757616 1 1 0 14992 2020-10-22 17:23:06 681652 2020-10-22 17:23:06 681704 2 Physical memory: 96%used(11793MB/12263MB) (>95%) : CRITICAL Physical memory: 96%used(11793MB/12263MB) (>95%) : CRITICAL 0 0
1757617 1 1 0 712 2020-10-22 17:23:22 568210 2020-10-22 17:23:22 568280 1 DRBD WARNING: Device 0 StandAlone UpToDate DRBD WARNING: Device 0 StandAlone UpToDate 0 0
1757618 1 1 0 11314 2020-10-22 17:23:40 953542 2020-10-22 17:23:40 961139 0 OK - Current BW in: 25.47Mbps Out: 2.19Mbps OK - Current BW in: 25.47Mbps Out: 2.19Mbps 0 13
1757619 1 1 0 4659 2020-10-22 17:24:40 638306 2020-10-22 17:24:40 643953 3 UNKNOWN: Error connecting to server at 'https://ddsda/sdk/webService': Perhaps host is not a vCenter or ESX server UNKNOWN: Error connecting to server at 'https://ddsda/sdk/webService': Perhaps host is not a vCenter or ESX server 0 11
+++++++++++++++++++++++++++++++++++++++++++++++++++


I can see only less than 10 items after running these command, So there is no any data for the september right, IS there any way to know how the data is purged for September, To prevent these happening in future.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Notification history is blank

Post by cdienger »

The command shows there is data for October but to check for September run:

Code: Select all

echo "select * from nagios_notifications where start_time between '2020-09-01' and '2020-09-31' limit 10;" | mysql -uroot -pnagiosxi -Dnagios
In either case of data being returned or not with the above command, I would look in the mysql logs to see if there were any problems with the database. The log location is usually /var/log/mysqld.log or /var/log/mariadb/mariadb.log.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Re: Notification history is blank

Post by mejokj »

Hello,

I have checked with the command it shows nothing and I will send the log file link to download in private chat.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Notification history is blank

Post by cdienger »

The log doesn't go far enough back, but it's huge because it looks like there is some debugging enabled. What does /etc/my.cnf look like. Here are the contents from a default install:

Code: Select all

[mysqld]
query_cache_size=16M
query_cache_limit=4M
tmp_table_size=64M
max_heap_table_size=64M
key_buffer_size=32M
table_open_cache=32
innodb_file_per_table=1

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
If you haven't already, I'd recommend setting up a XI machine with the purpose of just monitoring the production XI machine - https://assets.nagios.com/downloads/nag ... Server.pdf. This can help you be aware of problems that the production machine runs into.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked