The documentation for pnp4nagios states that "PNP provides access to RRD data using the xport controller. The output format can be specified. At the moment the formats xml, json and csv are supported."
The URLs provided in the pnp4nagios documentation do not entirely apply to an OP5 Monitor environment. The base URL you should be using for Monitor is:
https://host_name/monitor/op5/pnp/xport/
In this example, we request a CSV export of performance data with a default time range for the host object "172.16.40.1" and the service "_HOST_", which is a placeholder for the actual host check, not a service under the host.
https://host_name/monitor/op5/pnp/xport/csv?host=172.16.40.1&srv=_HOST_
The result is a CSV data displayed directly in the browser like the following:
timestamp;pkt_MIN;pkt_MAX;pkt_AVERAGE;rta_MIN;rta_MAX;rta_AVERAGE;pl_MIN;pl_MAX;pl_AVERAGE 1587446340;1;1;1;0.25605555556;0.25605555556;0.25605555556;0;0;0 1587446400;1;1;1;0.25605555556;0.25605555556;0.25605555556;0;0;0 1587446460;1;1;1;0.25605555556;0.25605555556;0.25605555556;0;0;0 1587446520;1;1;1;1.8312;1.8312;1.8312;0;0;0 1587446580;1;1;1;1.8312;1.8312;1.8312;0;0;0 1587446640;1;1;1;1.8312;1.8312;1.8312;0;0;0
(...)
Authentication
The pnp4nagios documentation shows examples using wget and basic HTTP authentication, like so:
wget -O image.png 'http://<user>:<pass>@<nagios-server>/pnp4nagios/ (...)
Since OP5 Monitor resources are protected with a login cookie and no basic authentication is set up for the above pnp/xport path, this will likely not work unless basic auth is added/reconfigured in your Apache instance. This is currently untested and unsupported.
Comments
0 comments
Please sign in to leave a comment.