---
title: "Fetching perfdata via API fails with ‘DS does not exist’ error"
description: "Fetching perfdata via the API can fail with a ‘DS does not exist’ error. Ensure the API endpoint specifies the correct datasource and the RRD Storage Type is set to MULTIPLE."
url: "https://docs.itrsgroup.com/docs/faq/op5/11015071647005-op5-monitor-fetching-perfdata-via-api-fails-with-ds-does-not-exist-error/index.html"
---
## 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:

![OP5 Monitor - Fetching perfdata via API fails with ‘DS does not exist’ error](https://docscdn.itrsgroup.com/faq/images/op5/11015071647005-inline-1-image002.png)

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


