Nagios XI Report Time frame
Nagios XI Report Time frame
When creating a top alert producers report on Wednesday I tried using the time period called "This Week" which I thought was 7 days from the date that the report was being generated. Turns out that it only does Sunday until Wednesday. Is it possible to create a report on the last 7 days from the date that the report is created and have that report auto-generate a report of the last 7 days from the date the report is created/sent out? I tried doing a custom report for a period of 7 days but it seems to auto generate the same dates specified.
Re: Nagios XI Report Time frame
Odd. What XI version are you on? I am on 5.2.2 and used the custom range from the 23rd to the 30th and it worked just fine. But you are correct, "This Week" and "Last Week" are not the last 7 days.
Former Nagios employee
Re: Nagios XI Report Time frame
Nagios XI 2014R2.6
Re: Nagios XI Report Time frame
Can you post a screenshot of the result when you generate a top alert producers using the 'Custom' period for 7 days back?
Former Nagios Employee
Re: Nagios XI Report Time frame
Yes and if I do this for the last 7 days from today it will have the dates 12/23 to 12/30. If I set this in a schedule for next week it will still give me the same report of 12/23 to 12/30 the following week. Last week I created a custom report report 12/16 to 12/23 expecting to get 7 days from the date of the report but this was not the case. I received the same report today as when I had originally created it.
Re: Nagios XI Report Time frame
You are correct. Currently, there is no option "Last 7 days" in the drop-down menu. "This week" and "Last week" is NOT the same, and the "Custom" period won't do it for what you would like to accomplish. You are welcome to post a feature request about adding this functionality. Perhaps our developers can add "Last 168 Hours" to the drop-down menu. I can also post an internal feature request to our system if you want me to. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios XI Report Time frame
You can edit this file:
Around line 667 change this:
To this:
Around line 714 change this:
To this:
That should get you a dropdown value for the last 7 days.
Let me know if that works for you.
Code: Select all
/usr/local/nagiosxi/html/includes/utils-reports.inc.phpCode: Select all
case "last24hours":
$start = strtotime("24 hours ago");
$end = $now;
break;Code: Select all
case "last24hours":
$start = strtotime("24 hours ago");
$end = $now;
break;
case "last7days":
$start = strtotime("7 days ago");
$end = $now;
break;Code: Select all
"last7days" => gettext("Last 7 Days"),Code: Select all
"last24hours" => gettext("Last 24 Hours"),
"last7days" => gettext("Last 7 Days"),That should get you a dropdown value for the last 7 days.
Let me know if that works for you.
Re: Nagios XI Report Time frame
lmiltchev yes I would appreciate it added as a feature request.
ssax thank you very much for modification in the report. Will this change when I upgrade from 2014R2.6 to the latest XI version?
ssax thank you very much for modification in the report. Will this change when I upgrade from 2014R2.6 to the latest XI version?
Re: Nagios XI Report Time frame
Done. TASK ID 7371.lmiltchev yes I would appreciate it added as a feature request.
Yes, the changes will be wiped out. You will have to redo the mods.ssax thank you very much for modification in the report. Will this change when I upgrade from 2014R2.6 to the latest XI version?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios XI Report Time frame
:/ I'm going to have to start keeping a list of all the modifications that need to be done every time I upgrade.