Related to:
When running the API to retrieve perfdata values, you may encounter the error 'DS does not exist'
Problem
The following can be seen if the API endpoint is run on a web browser:
The same error will appear if the API request is done through the CLI.
Possible Cause(s)
Root Cause 1: DS is not specified in the API endpoint.
Root Cause 2: RRD Storage Type setting for perfdata is set to SINGLE.
Possible Solution(s)
Solution Root Cause 1: Double-check that the endpoint you are using has the DS specified.
The endpoint should look like this:
https://op5-host/api/beta/perfdata/fetch/?format=json&host=HOSTNAME&service=SERVICENAME&ds=rta
The ds= part corresponds to the label of the datasource from the corresponding object's .XML definition. You can locate the .XML file in the following path: /opt/monitor/op5/pnp/perfdata/HOSTNAME
The .XML file will be labeled with the SERVICENAME. For example, for host GOMBURZA-loro and service PING, the path is then:
/opt/monitor/op5/pnp/perfdata/GOMBURZA-loro
You can then locate the correspnding .XML file by the service name:
# ls -l PING*
-rw-rw-r-- 1 monitor apache 3883 May 10 13:33 PING.xml
-rw-rw-r--. 1 monitor apache 384952 May 10 13:44 PING_pl.rrd
-rw-rw-r--. 1 monitor apache 384952 May 10 13:44 PING_rta.rrd
-rw-rw-r--. 1 monitor apache 384952 May 10 13:44 PING_rtmax.rrd
-rw-rw-r--. 1 monitor apache 384952 May 10 13:44 PING_rtmin.rrd
Inspecting PING.xml will give you the name/s of the available datasources:
# cat PING.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NAGIOS>
<DATASOURCE>
<TEMPLATE>check_ping</TEMPLATE>
<RRDFILE>/opt/monitor/op5/pnp/perfdata/GOMBURZA-loro/PING_rta.rrd</RRDFILE>
<RRD_STORAGE_TYPE>MULTIPLE</RRD_STORAGE_TYPE>
<RRD_HEARTBEAT>8460</RRD_HEARTBEAT>
<IS_MULTI>0</IS_MULTI>
<DS>1</DS>
<NAME>rta</NAME> <<<<<<<<<<---------- This is the datasource nam
<LABEL>rta</LABEL>
Solution Root Cause 2: Change RRD Storage Type to use MULTIPLE instead of SINGLE
Run the command below to check what the RRD_STORAGE_TYPE is.
grep RRD_STORAGE_TYPE /opt/monitor/etc/pnp/process_perfdata.cfg
To be able to use the api to fetch perfdata you need to have RRD_STORAGE_TYPE = MULTIPLE.
However, if you just change it you will lose all your graph history.
We have a tool for converting though. If this is something you want to do, follow the instructions below. It is recommended to make a backup first.
# yum clean all
# yum --enablerepo=op5-community install op5-support-modules\*
# mon sysconf rrd-storage-convert
Note that when the conversion is initiated, npcd service is stopped. rrdcached is flushed and stopped.
Related Articles
- Any existing FAQ / external website
If Issue Persists
- Please contact with our Client Services team via the chat service box available in any of our websites or via email to support@itrsgroup.com
- Make sure you provide to us:
- ANY LOG FILE OR DIAGNOSTIC
- ANY SCREENSHOT
- ANY VENDOR/VERSION OF WHAT THEY ARE TRYING TO CONNECT TO
-Any troubleshooting step already verified from the ones described in this article.
Comments
0 comments
Please sign in to leave a comment.