I have a customer who needs a CSV file for CPU MEM DISK from Nagios. I have tried exporting using the csv function from the reports but the data that spits out is not what we need.
Is there a way, or a query, I can use to extract DATETIME - HOSTNAME - CPU - PERFDATA
Nagios 5.4.3 Red Hat Linux 7
Getting raw perf data from Nagios
Re: Getting raw perf data from Nagios
We had to use RRDTool commands to extract the data then transform the export to csv files.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Getting raw perf data from Nagios
There is a utility called rrd2csv located in the nagiosxi/tools directory that you can use. Typical call to rrd2csv is:
Code: Select all
cd /usr/local/nagiosxi/tools
./rrd2csv.php --host=localhost --service='Current_Load' > Current_Load.csvCode: Select all
[root@localhost tools]# ./rrd2csv.php -h
Nagios XI RRD To CSV Tool
Copyright (c) 2011 Nagios Enterprises, LLC
Usage: ./rrd2csv.php --host=<host> [--service='<service>'] [--start=<start>] [--end=<end>]
Options:
<host> = Host name [required]
<service> = Service description: Use single quotes if spaces in name
<start> = Start time. Defaults to 'today.' Accepts -12h, -3d, or YYYYMMDD format.
<end> = End time. Defaults to 'today.' Accepts -12h, -3d, or YYYYMMDD format.
This utility creates host and service definitions for use in testing.