Atop data into InfluxDB

influxdb
telegraf
#1

On my Linux system I’m using the atop -a command to monitor its performance. I would like to get this data into InfluxDB in order to be able to benefit from all the fancy features :grinning: provided by the TICK stack. Could anyone provide me with advice what would be be the easiest way to reach my goal? Should I create an atop plugin for Telegraf? Or maybe there is another easier way to stream the metrics generated by atop to InfluxDB using Telegraf?

#2

Have you tried using the procstat input? If there are particular features of atop that are missing, we could potentially add them to this plugin.

#3

I looked at the procstat plugin but the problem is that with 1 second sampling rate for all processes it gives me extra 20% CPU load on a traffic host while the
$ atop 1 -a -w /..../output.log
gives me around 3% extra CPU load :frowning: So even though featurewise procstat plugin is a great thing it is unfortunately not an option when I look at the overhead that it generates on my traffic host. I hope that a dedicated atop plugin could provide me desired input but with smaller overhead.

Plan B that I just figured out is to send atop output to a network socket with
$ atop 1 -a > /dev/tcp/[ip_address]/[port]
or to a network pipe using netcat e.g.
$ atop 1 -a | netcat [ip_address] [port]
This way I could perform the CPU expensive operations such as parsing and formatting outside of my traffic host.

EDIT
After sleeping over it and discussing with my colleagues I believe that a dedicated atop plugin would be the best possible solution.

#4

Is your goal then to collect all processes at 1s interval? Will that include kernel tasks?