---
title: "Timeseries InfluxDB"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/administration/distributing-functionality/timeseries-influxdb/index.html"
---
## Overview

Opsview Timeseries InfluxDB (`opsview-timeseries-influxdb`) provides a Timeseries storage framework. It consists of dedicated InfluxDB Updaters and Queries processes to maximize the throughput.


**Note**


This cannot be installed at the same time as `opsview-timeseries-rrd`.



Full details on setting up or migrating to the InfluxDB graphing engine can be found on [Timeseries Graphing Engine](https://docs.itrsgroup.com/docs/opsview/6.11.7/administration/graphing-data-engine/index.html).

### InfluxDB Updaters

Opsview Timeseries InfluxDB Updaters launches a master management process that binds to the configured ports, for each port configured a worker process is started, each worker is responsible for handling the requests for the given port. That provides the guarantee that the data sent from Opsview Timeseries Enqueuer for a given host is handled by a single process only, thus removes the risk of processing the data out of order. The metadata (including the uoms) is stored in the SQlite3 database.

### InfluxDB Queries

Opsview Timeseries InfluxDB Queries provide a way of querying the gathered performance metrics and listing them.

## Dependencies

Opsview Timeseries InfluxDB can be installed on any supported platform. To reduce network traffic it is recommended to install it on the same host as the Opsview Timeseries Enqueuer component.

## Prerequisites

You must separately install InfluxDB, unlike RRD it is not bundled with Opsview.


**Note**


Only InfluxDB v1.x is currently supported.



```
# download package for your platform and follow the install documentation from InfluxDB
https://docs.influxdata.com/influxdb/v1/introduction/install/
  
# create a fresh Opsview database in InfluxDB
curl -i -XPOST http://127.0.0.1:8086/query --data-urlencode "q=CREATE DATABASE opsview"
```

## Installation

Refer to [Advanced Automated Installation](https://docs.itrsgroup.com/docs/opsview/6.11.7/install/advanced-installation/index.html).

## Configuration

If `opsview-timeseries-influxdb` was installed on other then Opsview Timeseries or Timeseries Enqueuer host, you need to update the `/opt/opsview/timeseriesinfluxdb/etc/timeseriesinfluxdb.yaml` file to listen other than loopback interface.

  ```
  ---
  timeseriesinfluxdb:
      server:
          user: opsview
          password: opsview
          updates:
              host: 127.0.0.1
              workers:
                  - port: 1640
                  - port: 1641
                  - port: 1642
                  - port: 1643
              logging:
                  loggers:
                      opsview:
                          level: NOTICE
          queries:
              host: 127.0.0.1
              port: 1660
              default_parameters:
                  data_points: 300
                  fill_option: "null"
                  min_time_slot: 0
                  counter_metrics_mode: "per_second"
              logging:
                  loggers:
                      opsview:
                          level: NOTICE
      data_dir: /opt/opsview/timeseriesinfluxdb/var/data
      influxdb:
          server: http://localhost:8086
          user:
          password:
          database: opsview
          retention_policy: default
  ```

All configurable options are listed in the `/opt/opsview/timeseriesinfluxdb/etc/timeseriesinfluxdb.defaults.yaml` and `/opt/opsview/timeseriesinfluxdb/etc/timeseriesinfluxdb.yaml.example.`

### HTTPS
#### To enable HTTPS for a remote InfluxDB server:

1. Modify `/opt/opsview/deploy/etc/opsview_deploy.yml` to include:

  ```
  influxdb_hosts:
    <InfluxDB hostname>:
      ip: <InfluxDB IP address>
  ```

2. Run the command:

  ```yaml
  /opt/opsview/deploy/bin/opsview-deploy /opt/opsview/deploy/lib/playbooks/influxdb-configuration.yml
  ```

3. As indicated by the output of the previous command, now update `opsview_timeseries_influxdb_server_url` in `/opt/opsview/deploy/etc/user_vars.yml` which indicates to use the loadbalancer to communicate with InfluxDB:

  ```
  opsview_timeseries_influxdb_server_url: http://localhost:18086
  ```

4. Run the command:

  ```yaml
  /opt/opsview/deploy/bin/opsview-deploy /opt/opsview/deploy/lib/playbooks/timeseries-install.yml
  ```

These steps will update the configuration of the InfluxDB server in `/etc/influxdb/influxdb.conf` to enforce HTTPS communication using the Opsview certificates.


**Note**


These steps do not apply when InfluxDB is running on the same host as the timeseries components.



#### Disable HTTPS for the InfluxDB server

1. Remove `influxdb_hosts` from `/opt/opsview/deploy/etc/opsview_deploy.yml`
2. On the InfluxDB hosts, modify `/etc/influxdb/influxdb.conf` to set:

  ```
    https-enabled = false
  ```

3. On the InfluxDB host, run:

  ```
  sudo systemctl restart influxdb
  ```

4. Update `opsview_timeseries_influxdb_server_url` in `/opt/opsview/deploy/etc/user_vars.yml` 

  ```
  opsview_timeseries_influxdb_server_url: http://<InfluxDB host>:8086
  ```

5. Run: 

  ```
  /opt/opsview/deploy/bin/opsview-deploy /opt/opsview/deploy/lib/playbooks/timeseries-install.yml
  ```
 
## Service Administration

As root, start, stop and restart the service using:

  ```
  /opt/opsview/watchdog/bin/opsview-monit <start|stop|restart> opsview-timeseriesinfluxdbupdates
  /opt/opsview/watchdog/bin/opsview-monit <start|stop|restart> opsview-timeseriesinfluxdbqueries
  ```

