Hello,
is there a way to display the time format of reports in 24h format instead of AM and PM ?
Saleem
Report in Nagios XI - Time format
-
saleemthupsee
- Posts: 107
- Joined: Wed Feb 15, 2017 4:22 am
- Location: Paris France
- Contact:
Report in Nagios XI - Time format
Saleem THUPSEE
Re: Report in Nagios XI - Time format
What report are you referring to? Can you show us a screenshot?
Some of the reports will show time in 24 hour format - see below: Please give us a specific example of what is not working.
Some of the reports will show time in 24 hour format - see below: Please give us a specific example of what is not working.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
saleemthupsee
- Posts: 107
- Joined: Wed Feb 15, 2017 4:22 am
- Location: Paris France
- Contact:
Re: Report in Nagios XI - Time format
It is this same report lmiltchev. It shows 11pm. My manager is asking if it shows 23H instead if 11 PM ? Is it possible to show the format in 24h instead of 12h (AM/PM). Otherwise it looks good to him.
Saleem THUPSEE
Re: Report in Nagios XI - Time format
Which part of the report shows the "wrong" format? Is it under the "Top Alert Producers", "Alert Histogram" or something else? Can you show us a screenshot?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
saleemthupsee
- Posts: 107
- Joined: Wed Feb 15, 2017 4:22 am
- Location: Paris France
- Contact:
Re: Report in Nagios XI - Time format
it alerts by hours of the day lmiltchev
see screen attached
I was wondering if 11pm could show 23hrs
Saleem
Paris
see screen attached
I was wondering if 11pm could show 23hrs
Saleem
Paris
You do not have the required permissions to view the files attached to this post.
Saleem THUPSEE
Re: Report in Nagios XI - Time format
In order to accomplish this, you will need to modify the "/usr/local/nagiosxi/html/reports/histogram.php" file. Keep in mind that your changes will be overwritten on an upgrade, so it's best to make a backup prior to an upgrade. It is also a very good idea to backup the original file, prior to modifying it. 
Once you backup up the histogram.php, open it in a text editor, i.e. vi, and change the code around lines 896 and 973, so that it would look like this:
Save, exit, and try accessing the report.
Here's an example from my test XI box:
Code: Select all
cd /usr/local/nagiosxi/html/reports
cp -p histogram.php histogram.php.originalCode: Select all
if (empty($xarr) === TRUE) {
$xarr = array("00:00", "1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00", "8:00", "9:00", "10:00", "11:00", "Noon", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00");Code: Select all
$hours = array(_("00:00"), _("1:00"), _("2:00"), _("3:00"), _("4:00"), _("5:00"), _("6:00"), _("7:00"), _("8:00"), _("9:00"), _("10:00"), _("11:00"), _("Noon"), _("13:00"), _("14:00"), _("15:00"), _("16:00"), _("17:00"), _("18:00"), _("19:00"), _("20:00"), _("21:00"), _("22:00"), _("23:00"));Here's an example from my test XI box:
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
saleemthupsee
- Posts: 107
- Joined: Wed Feb 15, 2017 4:22 am
- Location: Paris France
- Contact:
Re: Report in Nagios XI - Time format
great it worked.
Thanks, you can close the thread lmiltchev
Cheers,
Saleem
Paris
Thanks, you can close the thread lmiltchev
Cheers,
Saleem
Paris
Saleem THUPSEE
-
kyang
Re: Report in Nagios XI - Time format
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!