/usr/share/cagefs-skeleton/lib/python3.9/site-packages/glances/exports/__pycache__
a ���cL � @ sT d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m Z G dd� de�ZdS ) z1InfluxDB (from to InfluxDB 1.8+) interface class.� N)�node)�logger)� GlancesExport)�InfluxDBClient�WriteOptionsc s: e Zd ZdZd� fdd� Zdd� Zdd� Zd d � Z� ZS )�Exportz.This class manages the InfluxDB export module.Nc s� t t| �j||d� d| _d| _d| _d| _d| _d| _d| _ | j dg d�g d�d�| _| jsftd� t � �d �d | _ | �� | _dS )zInit the InfluxDB export IF.)�config�argsN�httpZ influxdb2)�host�port�user�password�org�bucket�token)�protocol�prefix�tags)Zmandatories�optionsz!Missing INFLUXDB version 1 config�.r )�superr �__init__r r r r r r �hostnameZ load_conf� export_enable�exitr �split�init�client)�selfr r �� __class__� �E/usr/lib/python3.9/site-packages/glances/exports/glances_influxdb2.pyr s"