javaspringspring-bootopentsdbmicrometer

Does Micrometer library support OpenTsdb as a Monitoring system?


Does Micrometer library support OpenTsdb as a Monitoring system?

If no, is there any third-party library that can work on the top of Micrometer and report metrics to OpenTsdb?


Solution

  • At the time of writing, there's no direct support or plan for OpenTSDB but you can use Telegraf (especially OpenTSDB Output Plugin) for OpenTSDB.

    See https://github.com/micrometer-metrics/micrometer/issues/490


    UPDATED:

    TBH I'm not familiar with Telegraf but it looks to have a similar architectural pattern with Logstash, so I just gave a try. What I have tried as follows:

    1. Install and run OpenTSDB:

      $ brew install opentsdb
      $ /usr/local/opt/hbase/bin/start-hbase.sh
      $ /usr/local/opt/opentsdb/bin/start-tsdb.sh

    2. Install Telegraf:

      $ brew update
      $ brew install telegraf

    3. Generate a Telegraf configuration:

      $ telegraf -sample-config -input-filter statsd -output-filter opentsdb > telegraf-statsd-opentsdb.conf

    4. Change the generated Telegraf configuration (telegraf-statsd-opentsdb.conf):

      #host = "opentsdb.example.com"
      host = "localhost"

    5. Run Telegraf:

      $ telegraf -config telegraf-statsd-opentsdb.conf

    6. Setup Micrometer by adding StatsD implementation with Telegraf flavor. See this branch for a sample but note that I changed the port for the StatsD (i.e. Telegraf here) to avoid my local port conflict, so the property should be removed unless you change your Telegraf's port.

    With the above flow, it seems to work for me.