Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Influxdb configuration for Snap #109

Open
malleshicn opened this issue Jan 18, 2017 · 2 comments
Open

Influxdb configuration for Snap #109

malleshicn opened this issue Jan 18, 2017 · 2 comments
Labels

Comments

@malleshicn
Copy link

Hi Team,
Snap daemon version (use snapteld -v): snapteld version 1.0.0
Environment: VM hosted in Esxi

Cloud provider or hardware configuration:NA
OS (e.g. from /etc/os-release): ubuntu 16.04 x86
Kernel (e.g. uname -a): Linux ubuntu 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Relevant tools (e.g. plugins used with Snap): Grafana/influxdb
Others (e.g. deploying with Ansible):NA

What happened:
I have installed snap telemetry and would like to use influxdb to get metrics , from snap and to display it on Grafana.
1.
is there any plugin to push logs to influxdb. I referred https://github.com/katarzyna-z/snap-plugin-publisher-influxdb . But after ' make ' I am not clear with the steps. How to get snap metrics in influxdb ? how to configure it
2. Snap DS does not support Alert creation in Grafana. any plan to support in future release?

What you expected to happen:
I should be able to configure graphs on grafana and grafana should be able to pull metrics from influxdb

Thanks
Malleshi CN

Snap daemon version (use snapteld -v):

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Relevant tools (e.g. plugins used with Snap):
  • Others (e.g. deploying with Ansible):

What happened:

What you expected to happen:

Steps to reproduce it (as minimally and precisely as possible):

Anything else do we need to know (e.g. issue happens only occasionally):

@katarzyna-z
Copy link
Contributor

katarzyna-z commented Jan 31, 2017

@malleshicn Here it is runnable example: https://github.com/intelsdi-x/snap-plugin-publisher-influxdb/tree/master/examples/tasks. You can find there also exemplary task manifests.

If you are not familiar with Snap please follow the instruction which is described in getting-started.

I prepared for you step by step example of using psutil collector plugin (this plugin does not require additonal configuration) and influxdb publisher:

  1. get binaries (snaptel, snapteld, snap-plugin-collector-psutil, snap-plugin-publisher-influxdb)
$ wget https://github.com/intelsdi-x/snap/releases/download/1.0.0/snap-1.0.0-linux-amd64.tar.gz
$ tar -xzf snap-1.0.0-linux-amd64.tar.gz 
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-psutil/latest/linux/x86_64/snap-plugin-collector-psutil
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-influxdb/latest/linux/x86_64/snap-plugin-publisher-influxdb
  1. create a task manifest
$ touch task.json
$ nano task.json 

copy this content into task.json (adjust config section if needed):

{
  "version": 1,
  "schedule": {
    "type": "simple",
    "interval": "1s"
  },
  "workflow": {
    "collect": {
      "metrics": {
        "/intel/psutil/load/load1": {},
        "/intel/psutil/load/load5": {},
        "/intel/psutil/load/load15": {},
        "/intel/psutil/vm/free": {},
        "/intel/psutil/vm/used": {}
      },
      "publish": [
        {
          "plugin_name": "influxdb",
          "config": {
            "host": "127.0.0.1",
            "port": 8086,
            "database": "snap",
            "user": "admin",
            "password": "admin"
          }
        }
      ]
    }
  }
}
  1. connect to influxdb and create database with name snap
  2. start snap
$ ./snapteld -l 1 -t 0

in another terminal window (from the same directory)

  1. load plugins
$ ./snaptel plugin load snap-plugin-collector-psutil 
$ ./snaptel plugin load snap-plugin-publisher-influxdb 
  1. create a task
$ ./snaptel task create -t task.json
  1. check that task is running
$ ./snaptel task list

now connect to influxdb, use snap database and check saved data.

is there any plugin to push logs to influxdb

If you mean a collection of logs and publishing them into influxdb you can use snap-plugin-collector-logs, see example. You can also check the full example with logs collector and elasticsearch, see it.

@jcooklin
Copy link
Collaborator

jcooklin commented Jan 31, 2017

@malleshicn: In addition to @katarzyna-z's instructions you can also checkout https://github.com/intelsdi-x/snap-labs/tree/master/advanced-deployment-docker-snap-influxdb-grafana for a docker-compose setup.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants