Telegraf
Telegraf is an agent that pushes metrics to a server, such as InfluxDB.
Installation
The install instructions can be found at https://docs.influxdata.com/telegraf/v1.22/install/. Distro-specific repos are listed on this page and this is probably the preferred method to install Telegraf.
Alternatively, you can download and extract the binaries directly to your system. You will have to set up the systemd service script manually.
# wget https://dl.influxdata.com/telegraf/releases/telegraf-1.26.0_linux_amd64.tar.gz
# tar -C / --strip-components=2 -xzvf telegraf-1.26.0_linux_amd64.tar.gz
Tasks
Monitoring CPU frequency
Simplest way is to use an exec input:
[[inputs.exec]]
commands = ["bash -c \"grep MHz /proc/cpuinfo | /bin/awk -F: '{freq += \\$2; n++} END{printf(\\\"%f\\\", freq/n); }'\" "]
name_override = "cpu_freq"
data_format = "value"
data_type = "float"
This will just retrieve the CPU speeds which awk will average out as a single value.
$ grep MHz /proc/cpuinfo | awk -F: '{freq+=$2; n++} END {printf("%f", freq/n);}'
3099.926000
Monitoring SNMP
Use the SNMP plugin. You will have to install the net-snmp-utils package as the plugin uses the snmptranslate program.