简体   繁体   中英

Implementing graphs in Uchiwa with Sensu

I need to do a monitoring platform for my compagny.

I set up basic sensu plugins et an Uchiwa platform, but the display for the CPU usage is not clear, I have something like this :

client1.cpu.total.user 3765 10393830287

client1.cpu.total.nice 3 76578464634

Do you know how can I do a graph with data like that? Or do you have any advice for my job ?

Thanks

Set up a Graphite/carbon instance ( https://graphite.readthedocs.org/en/latest/ ). This will probably take some time and research. It took me a couple of weeks to get it working properly.

Graphite consists of a few parts: Carbon-relay accepts data and "relays" it to a carbon-cache. You really only need this if you're going for a highly available setup with multiple servers.

Carbon-cache is the service which stores the data to disk using Whisper, or responds to a query for data.

Whisper is the database component.

Graphite-web is the front end used for graphing (you'll need apache/nginx/whatever).

Then use a Sensu handler to send your metrics to carbon-relay/cache:

{
  "handlers": {
    "graphite": {
      "type": "tcp",
      "socket": {
        "host": "graphite-host.whatever.com",
        "port": 2003
      },
      "mutator": "only_check_output"
    }
  }
}

From there you can either set up graphs in graphite, or use another graphing tool (like Grafana) to query carbon and make graphs.

(You could also use something like InfuxDb but i found Graphite to be a little bit better - personal preference, I guess. Grafana can read InfluxDB data sources.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM