etichy / grafana-swis-datasource

DataSource plugin for grafana to access SolarWinds data via SWIS REST API
MIT License
52 stars 11 forks source link

SolarWinds SWIS DataSource based on Simple JSON Datasource

SWIS (SolarWinds Information Service) uses SWQL language - learn more

DataSource connects to SWIS HTTP REST endpoint. As URl specify SWIS HTTP endpoint address which is by default

Unfortunately this endpoint doesn't support CORS so we can connect only via Server(default) and due to self-signed certificate we need to check option 'Skip TLS Verify'. Anonymous connection is not permited so you need to fill in your orion account credentials.

Connection example

SWIS query language

SWQL language is proprietal solarwinds query language to get data from all their data sources, learn more

Time Series:

For time series data there are these conditions.

  1. There has to be time column
  2. There has to be string column to define metric name
  3. There has to be value column(s), in case more columns are specified we will add suffix to metric name.
  4. Data must be ordered by time

Table:

Grafana macros available to use:

Time Sampling:

Variable queries:

For annotation queries:

Example of query with time sampling to display CPUload and memory per node:

SELECT
     downsample(ObservationTimeStamp) as time,
     a.Node.Caption,
     AVG(AvgLoad) as CpuLoad,
     AVG(AvgMemoryUsed) as MemoryUsed
FROM Orion.CPULoad a
WHERE ObservationTimeStamp BETWEEN $from AND $to
GROUP BY downsample(ObservationTimeStamp), a.Node.Caption, a.NodeID
ORDER BY time DESC

Installation Manually

  1. Download sources zip file.
  2. Extract the zip file into the data/plugins subdirectory for Grafana.
  3. Because this plugin is not signed, you need to add exception into your grafana configuration. Navigate to grafana folder /conf/defaults.ini and find option allow_loading_unsigned_plugins which has to be equal
    allow_loading_unsigned_plugins = solarwinds-swis-datasource
  4. Restart the Grafana server
  5. To make sure the plugin was installed, check the list of installed data sources.