Fix PNP4Nagios graphs custom date/time display issue - Nagios

When trying to get the custom time range for PNP4Nagios graphs, it might result in an error "application/models/data.php [664]:". It can easily resolved by editing "system.php"  in PNP4Nagios controllers folder. To start with first make a backup of the file.

# cp -a /usr/local/pnp4nagios/share/application/controllers/system.php /usr/local/pnp4nagios/share/application/controllers/system.php.bkp

And then start with editing the "system.php" file

# vi /usr/local/pnp4nagios/share/application/controllers/system.php

Remove "pnp::clean()" from the below 2 lines

Before

$this->start             = pnp::clean($this->input->get('start',FALSE));
$this->end               = pnp::clean($this->input->get('end',FALSE));

After

$this->start             = $this->input->get('start',FALSE);
$this->end               = $this->input->get('end',FALSE);

That's all that needs to be done and custom date filter should work now for graphs. Any issues, please let us know via Contact Us/Comments.

Most Read Articles

Add/Detect a new disk in ...

Written By Farooq Mohammed Ahmed on Sunday, 11 January 2015 19:22
Add/Detect a new disk in ...

Replace SSL Certificates ...

Written By Farooq Mohammed Ahmed on Friday, 16 December 2016 08:05
Replace SSL Certificates ...

Using awk in Alias Comman...

Written By Farooq Mohammed Ahmed on Friday, 19 February 2016 14:22
Using awk in Alias Comman...

Sed - Insert Text before ...

Written By Farooq Mohammed Ahmed on Monday, 20 November 2017 00:58
Sed - Insert Text before ...

Script to Monitor Nagios ...

Written By Farooq Mohammed Ahmed on Monday, 18 July 2016 22:48
Script to Monitor Nagios ...