Page 1 of 3

Cannot download CSV from Performance Graph

Posted: Tue Nov 19, 2019 9:29 am
by noweda
Hello,

we have the same issue, that was described here: https://support.nagios.com/forum/viewto ... 16&t=54669

The permissions seme to be correct:

Code: Select all

root@ux010162:/usr/local/nagiosxi# ls -lad /usr/local/nagiosxi/tmp                                                       
drwsrwsr-x 4 root nagios 12288 Nov 19 15:26 /usr/local/nagiosxi/tmp
Even with 777 the message remains the same:
Couldn't create temporary file. Check that the directory permissions for the /usr/local/nagiosxi/tmp directory are set to 775.
What can we do?

Best regards
Christoph

Re: Cannot download CSV from Performance Graph

Posted: Tue Nov 19, 2019 9:51 am
by scottwilkerson
By chance are you on a 32 bit system?

Code: Select all

uname -a
Lets try this
in /usr/local/nagiosxi/html/includes/components/graphexplorer/templates/perfdata.inc.php on line 112
change this

Code: Select all

$start = (int) $args['start'];
to this

Code: Select all

$start = $args['start'];
then try again.

Please let us know if this resolves the issue

Re: Cannot download CSV from Performance Graph

Posted: Tue Nov 19, 2019 10:08 am
by noweda
Thank you for your quick response!

Code: Select all

root@ux010162:/usr/local/nagiosxi/tmp# uname -a
Linux ux010162.noweda.de 2.6.32-754.17.1.el6.x86_64 #1 SMP Tue Jul 2 12:42:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I changed line 112 as described - no effect.

But I realized something else:
1. With another host it works! I'm able to download CSV, JSON and XML from another host
2. When I try to download CSV, JSON or XML from one of the affected hosts, zero bytes files are created in tmp-dir:

Code: Select all

root@ux010162:/usr/local/nagiosxi/tmp# ll -atr *.csv
-rw-r--r-- 1 apache nagios 0 Nov 19 16:01 04144217b6bf04faaee771d0a77dfdcd.csv
-rw-r--r-- 1 apache nagios 0 Nov 19 16:04 d553fd4d045fd23181b8a69cfeb8ecc4.csv

Re: Cannot download CSV from Performance Graph

Posted: Tue Nov 19, 2019 4:03 pm
by ssax
Try this:

Code: Select all

chown -R apache.nagios /usr/local/nagiosxi/tmp
chmod 6775 /usr/local/nagiosxi/tmp
service httpd restart
Please run this tail command as root (and leave it running):

Code: Select all

tail -Fn0 /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/load_url.log /usr/local/nagiosxi/var/eventman.log /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Then try to download again and send us the full output after it has failed.

Re: Cannot download CSV from Performance Graph

Posted: Wed Nov 20, 2019 10:09 am
by noweda
==> /usr/local/nagiosxi/var/cmdsubsys.log <==

==> /usr/local/nagiosxi/var/load_url.log <==

==> /usr/local/nagiosxi/var/eventman.log <==

==> /var/log/httpd/error_log <==

==> /var/log/httpd/ssl_error_log <==

==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
PROCESS EVENT: ID=5263416, SOURCE=2, TYPE=1, TIME=2019-11-20 16:04:42
*** GLOBAL HANDLER...
Array
(
[event_id] => 5263416
[event_source] => 2
[event_type] => 1
[event_time] => 2019-11-20 16:04:42
[event_meta] => Array
(
[handler-type] => service
[host] => SR81-000-009
[service] => Service-Veeam-MountService
[hostaddress] => 10.181.0.9
[hoststate] => UP
[hoststateid] => 0
[hosteventid] => 4225320
[hostproblemid] => 0
[servicestate] => CRITICAL
[servicestateid] => 2
[lastservicestate] => OK
[lastservicestateid] => 0
[servicestatetype] => SOFT
[currentattempt] => 1
[maxattempts] => 4
[serviceeventid] => 4253381
[serviceproblemid] => 1978591
[serviceoutput] => (Service check timed out after 60.00 seconds)
[longserviceoutput] =>
[servicedowntime] => 0
)

[logging_enabled] => 1
)
PHP Notice: unserialize(): Error at offset 65535 of 65535 bytes in /usr/local/nagiosxi/html/includes/components/jira/jira.inc.php on line 241
PHP Notice: unserialize(): Error at offset 65535 of 65535 bytes in /usr/local/nagiosxi/html/includes/components/jira/jira.inc.php on line 241
PHP Notice: unserialize(): Error at offset 65535 of 65535 bytes in /usr/local/nagiosxi/html/includes/components/jira/jira.inc.php on line 502
PHP Warning: array_key_exists() expects parameter 2 to be array, boolean given in /usr/local/nagiosxi/html/includes/components/jira/jira.inc.php on line 505
PHP Notice: unserialize(): Error at offset 65535 of 65535 bytes in /usr/local/nagiosxi/html/includes/components/jira/jira.inc.php on line 241
PHP Notice: Undefined variable: settings in /usr/local/nagiosxi/html/includes/components/mtr/mtr.inc.php on line 533
*** GLOBAL HANDLER (snmptrapsender)...
Array
(
[event_id] => 5263416
[event_source] => 2
[event_type] => 1
[event_time] => 2019-11-20 16:04:42
[event_meta] => Array
(
[handler-type] => service
[host] => SR81-000-009
[service] => Service-Veeam-MountService
[hostaddress] => 10.181.0.9
[hoststate] => UP
[hoststateid] => 0
[hosteventid] => 4225320
[hostproblemid] => 0
[servicestate] => CRITICAL
[servicestateid] => 2
[lastservicestate] => OK
[lastservicestateid] => 0
[servicestatetype] => SOFT
[currentattempt] => 1
[maxattempts] => 4
[serviceeventid] => 4253381
[serviceproblemid] => 1978591
[serviceoutput] => (Service check timed out after 60.00 seconds)
[longserviceoutput] =>
[servicedowntime] => 0
)

[logging_enabled] => 1
)
SNMP TRAP SENDER NOT CONFIGURED!
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /var/log/httpd/error_log <==
ERROR: No DS called '3' in '/usr/local/nagios/share/perfdata/AC010022/_HOST_.rrd'

==> /usr/local/nagiosxi/var/cmdsubsys.log <==
.
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
.
==> /var/log/httpd/error_log <==
ERROR: No DS called '3' in '/usr/local/nagios/share/perfdata/AC010024/_HOST_.rrd'

==> /usr/local/nagiosxi/var/cmdsubsys.log <==
./bin/sh: nagios: command not found

==> /usr/local/nagiosxi/var/eventman.log <==
/bin/sh: nagios: command not found

==> /usr/local/nagiosxi/var/cmdsubsys.log <==

PROCESSED 0 COMMANDS

==> /usr/local/nagiosxi/var/eventman.log <==

PROCESSED 2 EVENTS
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /var/log/httpd/error_log <==
ERROR: No DS called '3' in '/usr/local/nagios/share/perfdata/AC010025/_HOST_.rrd'

==> /usr/local/nagiosxi/var/cmdsubsys.log <==
.
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /var/log/httpd/error_log <==
ERROR: No DS called '3' in '/usr/local/nagios/share/perfdata/AC010027/_HOST_.rrd'

==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==

Re: Cannot download CSV from Performance Graph

Posted: Wed Nov 20, 2019 5:00 pm
by ssax
What is the output of this command?

Code: Select all

ls -lh /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp
Please send the exact hostname/servicename and the exact place you are trying to do this in the web GUI so that we can look into it more.

This could be related:

Code: Select all

ERROR: No DS called '3' in '/usr/local/nagios/share/perfdata/AC010024/_HOST_.rrd'
Please attach that file as well so that I can query it.

Re: Cannot download CSV from Performance Graph

Posted: Thu Nov 21, 2019 4:20 am
by noweda
ssax wrote:What is the output of this command?

Code: Select all

root@ux010162:~# ls -lh /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp
total 0

Please send the exact hostname/servicename and the exact place you are trying to do this in the web GUI so that we can look into it more.

Code: Select all

/usr/local/nagios/share/perfdata/SR010080/_HOST_.rrd
/usr/local/nagios/share/perfdata/SR010080/_Disk_.rrd
Please attach that file as well so that I can query it.

Disk.rrd
_HOST_.rrd

Re: Cannot download CSV from Performance Graph

Posted: Thu Nov 21, 2019 2:43 pm
by mbellerue
Thank you for those files. What are the names of the hosts or services that you are trying to get the data for?

Re: Cannot download CSV from Performance Graph

Posted: Thu Nov 21, 2019 3:07 pm
by noweda
Hello,

the host is SR010080 and we are trying to download the ping performance graph (host check).

Best regards
Christoph

Re: Cannot download CSV from Performance Graph

Posted: Thu Nov 21, 2019 6:07 pm
by tgriep
It looks like the RRD file only has 2 datapoints but I would guess that the .xml file has 3 and that is causing the error.

Delete the .rrd file and the .xml file for that host and let it recreate it and see if you can download the csv file then.