Number of warning and critcal alerts
Number of warning and critcal alerts
It seems the eventlog is capped at 100000 records. Last year I was able to retrieve the number of warning and critical alerts, but this year, i have 100000+ records, so it seems the eventlog doesn't go back further then three months. How would I be able to retrieve the number of warning and critical events of this year?
The same goes for notifications. It seems I also can go back further then September. Why is there no data of notifications before September?
The same goes for notifications. It seems I also can go back further then September. Why is there no data of notifications before September?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Number of warning and critcal alerts
Check your settings under the "Performance Settings" page. (Admin->Performance Settings)
You can increase these value, but keep in mind the database tables can grow quite large...
You can increase these value, but keep in mind the database tables can grow quite large...
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Number of warning and critcal alerts
Ludmill,
Do you have any numbers for this? I know I can go back untill september 15, so I would 350k records. Any ideas what the impact would be? If I enlarge the amount of records, is this instantly or will it only expand from the moment I make it larger? Can I easily set it back to 100k?
Grtz
Willem
Do you have any numbers for this? I know I can go back untill september 15, so I would 350k records. Any ideas what the impact would be? If I enlarge the amount of records, is this instantly or will it only expand from the moment I make it larger? Can I easily set it back to 100k?
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Number of warning and critcal alerts
There is a config.inc.php option that can be changed to accomodate this
in /usr/local/nagiosxi/html/config.inc.php change
to
If you are generating PDF reports however, there is an additional limiter hardcoded in
/usr/local/nagiosxi/html/reports/eventlog.php
on line 665 change
to
in /usr/local/nagiosxi/html/config.inc.php change
Code: Select all
$cfg['default_result_records'] = 100000; // max number of records to return by defaultCode: Select all
$cfg['default_result_records'] = 350000; // max number of records to return by default/usr/local/nagiosxi/html/reports/eventlog.php
on line 665 change
Code: Select all
$newurl .= "&records=100000"; // Max: 100,000 alert producersCode: Select all
$newurl .= "&records=350000"; // Max: 350,000 alert producersRe: Number of warning and critcal alerts
Scott,
Thank you. Setting $cfg['default_result_records'] tot 500000 did the trick.
The state changes history now goes back to january. I did notice that there seems to be a difference between the number of records the state change history displays and the number of records I have once exported to csv.
The state change history says:
The csv, once imported in Excel only has 203092 records. Any idea what might cause the differnce? +-63k records is not a small difference...
While writing this, I notice that in the csv, some state changes are split over multile lines: See screenshot attached. I saw this in Excel and in Notepad++. This seeems like some sort of bug?
EDIT: I found out why there might be such a difference of records. The csv only starts in 21/02/2014. Is there any limit I need to edit for export to csv?
Grtz
Willem
Thank you. Setting $cfg['default_result_records'] tot 500000 did the trick.
The state changes history now goes back to january. I did notice that there seems to be a difference between the number of records the state change history displays and the number of records I have once exported to csv.
The state change history says:
Code: Select all
Report Covers From: 2014-01-01 00:00:00 To : 2014-12-23 09:31:10
Showing 8.151-8.175 of 270.567 total recordsWhile writing this, I notice that in the csv, some state changes are split over multile lines: See screenshot attached. I saw this in Excel and in Notepad++. This seeems like some sort of bug?
EDIT: I found out why there might be such a difference of records. The csv only starts in 21/02/2014. Is there any limit I need to edit for export to csv?
Grtz
Willem
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Number of warning and critcal alerts
@WillemDH - While I do not know if it actually could make up a missing 63k items, I did find a bug in the CSV export function that didn't handle custom reports the same way as the displayed item does. Attached is a fixed version, which can be unzipped and placed in /usr/local/nagiosxi/html/reports/
Also, this file attempts to replace \r & \n with spaces which I believe was causing the split to multiple lines
Also, this file attempts to replace \r & \n with spaces which I believe was causing the split to multiple lines
You do not have the required permissions to view the files attached to this post.
Re: Number of warning and critcal alerts
Scott,
I uploaded your eventlog.php to /usr/local/nagiosxi/html/reports/ and exported another csv, but I still see records split over multiple lines. Just a thought, but I was talking about the state history report, does it also use eventlog.php for exporting to csv?
Grtz
Willem
I uploaded your eventlog.php to /usr/local/nagiosxi/html/reports/ and exported another csv, but I still see records split over multiple lines. Just a thought, but I was talking about the state history report, does it also use eventlog.php for exporting to csv?
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Number of warning and critcal alerts
Oops, I don't know why I thought that was the eventlog.... Here is the same fixes for state history, install the same wayWillemDH wrote:Scott,
I uploaded your eventlog.php to /usr/local/nagiosxi/html/reports/ and exported another csv, but I still see records split over multiple lines. Just a thought, but I was talking about the state history report, does it also use eventlog.php for exporting to csv?
Grtz
Willem
You do not have the required permissions to view the files attached to this post.
Re: Number of warning and critcal alerts
Scott,
I was able to create the reports. Thanks for the update.
Thread can be closed.
Grtz
Willem
I was able to create the reports. Thanks for the update.
Thread can be closed.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Number of warning and critcal alerts
We'll go ahead and close this thread. Thanks.