Skip to content

Observium

AlexMuliar edited this page Sep 30, 2022 · 30 revisions

Observium integration extracts data from the Observium MySQL database, it stores only the latest values, so extracting historical data is not available.

Source file config

Property Type
type String
name String
config Object

All properties are required

config object properties:

Property Type Required Description
host String yes Observium MySQL database host
port String no Observium MySQL port
username String no Observium MySQL username
password String no Observium MySQL password
databse Boolean yes Observium MySQL database name

Example

[
  {
    "type": "observium",
    "name": "observium",
    "config": {
      "host": "mysql",
      "port": "3306",
      "username": "root",
      "database": "observium"
    }
  }
]

Pipeline File config

Properties list

Property Required Value type in config file Description
source yes String Source config name
pipeline_id yes String Unique pipeline identifier
interval yes Integer Query data every N seconds
query yes String A MySQL query to extract data from the database, the query must contain the '{TIMESTAMP_CONDITION}' in the where clause so the agent can make queries based on the timestamp
default_values_type no String If this field is specified, you can omit specifying measurements and dimensions, a list of default measurements and dimensions will bu used. Possible values: ports, mempools, processors, storage. See the list of default values below
dimensions no Object Which fields to use as dimensions. If not specified, default dimensions will be used, see the list below
dimension_configurations no Object A configuration that describes how to create dimensions, see the Fields to learn more
values no Object Value columns with target types. If not specified, default values will be used, see the list below
units no Object Key-value pairs (value:unit). The value must be from the values column, units can be any.
measurement_configurations no Object A configuration that describes how to create measurements, see the Fields to learn more
tags no Tags that will be added to all metrics
tag_configurations no Object A configuration that describes how to create tags, see the Fields to learn more
timestamp yes Object An object describing how to extract the timestamp from data. Contains name and type fields. name - column name where the timestamp is stored. type - only unix is supported currently
properties no Object Dimensions with static values that will be added to all metrics
lookups no Object Configuration of lookups
notifications no object See notifications page

Default dimensions list

Ports

['ifName', 'ifAlias', 'ifDescr', 'ifSpeed', 'sysName', 'location', 'processor_type', 'processor_name', 'Memory_Pool_ID', 'Memory_Pool_Description', 'Memory_Pool_Vendor', 'storage_description', 'storage_type']

Mempools

['mempool_id', 'mempool_descr', 'mempool_mib']

Processors

['processor_type', 'processor_descr']

Storage

['storage_descr', 'storage_type']

Default measurements list

Ports

{
    "ifInUcastPkts": "counter",
    "ifInUcastPkts_rate": "counter",
    "ifOutUcastPkts": "counter",
    "ifOutUcastPkts_rate": "counter",
    "ifInErrors": "counter",
    "ifInErrors_rate": "counter",
    "ifOutErrors": "counter",
    "ifOutErrors_rate": "counter",
    "ifOctets_rate": "counter",
    "ifUcastPkts_rate": "counter",
    "ifErrors_rate": "counter",
    "ifInOctets": "counter",
    "ifInOctets_rate": "counter",
    "ifOutOctets": "counter",
    "ifOutOctets_rate": "counter",
    "ifInOctets_perc": "gauge",
    "ifOutOctets_perc": "gauge",
    "ifInNUcastPkts": "counter",
    "ifInNUcastPkts_rate": "counter",
    "ifOutNUcastPkts": "counter",
    "ifOutNUcastPkts_rate": "counter",
    "ifInBroadcastPkts": "counter",
    "ifInBroadcastPkts_rate": "counter",
    "ifOutBroadcastPkts": "counter",
    "ifOutBroadcastPkts_rate": "counter",
    "ifInMulticastPkts": "counter",
    "ifInMulticastPkts_rate": "counter",
    "ifOutMulticastPkts": "counter",
    "ifOutMulticastPkts_rate": "counter",
    "port_mcbc": "counter",
    "ifInDiscards": "counter",
    "ifInDiscards_rate": "counter",
    "ifOutDiscards": "counter",
    "ifOutDiscards_rate": "counter",
    "ifDiscards_rate": "counter"
}

Mempools

{"mempool_perc": "gauge", "mempool_used": "counter", "mempool_free": "counter", "mempool_total": "counter"}

Processors

{"processor_usage": "gauge"}

Storage

{"storage_free": "counter", "storage_used": "counter", "storage_perc": "gauge"}

Pipeline configuration example

[
  {
    "source": "observium",
    "pipeline_id": "observium_mempools",
    "interval": 3600,
    "default_values_type": "mempools",
    "lookups": {
      "STATES": {
        "type": "file",
        "path": "/home/user/states.csv",
        "format": "CSV"
      }
    },
    "dimensions": [
      "Memory_Pool_ID",
      "Memory_Pool_Description",
      "Memory_Pool_Vendor",
      "Vendor"
    ],
    "dimension_configurations": {
      "Vendor": {
        "value_path": "vendor",
        "transformations": [
          {
            "type": "function",
            "name": "regex_substring",
            "args": ["(.+)\\..+", "\\g<1>"]
          }
        ]
      },
      "Memory_Pool_ID": {
        "value_path": "mempool_id"
      },
      "Memory_Pool_Description": {
        "value_path": "mempool_descr"
      },
      "Memory_Pool_Vendor": {
        "value_path": "mempool_mib"
      }
    },
    "values": {
      "value_perc": "gauge",
      "value_units_by_8": "counter"
    },
    "measurement_configurations": {
      "value_units_by_8": {
        "value_path": "value_units",
        "transformations": [
          {
            "type": "function",
            "name": "divide",
            "args": [8]
          }
        ]
      }
    },
    "tag_configurations": {
      "INTERFACE_ALIAS": {
        "value_path": "ifAlias"
      },
      "INTERFACE_DESCRIPTION": {
        "value_path": "ifDescr"
      }
    },
    "query": "SELECT m.*, d.sysName, dl.location, ml.vendor FROM mempools m JOIN devices d ON d.device_id = m.device_id JOIN devices_locations dl ON dl.device_id = m.device_id JOIN mempools_lookup ml ON ml.mempool_id = m.mempool_id AND ml.device_id = m.device_id WHERE {TIMESTAMP_CONDITION}"
  }
]

Configuration of dimensions, measurements and tags

With Observium integration, we introduced a new way of configuring dimensions, measurements and tags, it is done by adding a configuration with corresponding keys measurements_configurations, dimension_configurations, tag_configurations. Each value in these configurations is a field. To learn about fields visit the fields wiki page

Each field key is the final name of the field (tag, dimension or measurement) that will be sent to Anodot.

Transformation functions

To learn about transformation functions visit the transformation docs page

Lookup transformations

To learn about lookup transformations visiti the lookup transformations page

Clone this wiki locally