Telegraf addon for hassio (glances alternative)

Ok - thanks. I will let you know.

Ok so we are moving a step closer :slightly_smiling_face:

I re-installed and it seeā€™s the new config however I still receive the following error message for the sensor:

2019-11-20T13:13:40Z E! [inputs.sensors] Error in plugin: failed to run command /usr/bin/sensors -A -u: exit status 1 - No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

I think this will error no matter which sensor we try to load.

Then the second issue is that the IPMI wont load and i get the following:

2019-11-20T13:13:50Z E! [inputs.ipmi_sensor] Error in plugin: failed to run command /usr/bin/ipmitool -H 192.168.xx.xx -U xxx -P xxx -I lanplus sdr: Command timed out.

Strange this is when I go to the consol of the container and run that command it works fine and it starts to pull the data from the iDRACā€¦so it is an error occurring in the command execution within the script.

I will also try looking into the script to see if I can see where it is going wrong. Thank you for your efforts so far - really appreciate it

ā€¦im wondering if there is an issue with the echo command for the ipmi servers line (line 78). Does the ā€™ instead of " cause an error. I did try to reproduce your code,make the changes and test myself but i cant get past the image line in the config.json. Would the following work?

echo " servers = [/ā€œUSER_ID:PASSWORD@PROTOCOL(IP)/ā€]"

I tested it on the command line and it worked

I will try escaping the speech Markā€™s and see :slight_smile: also I will push an update tonight hopefully. With regard to the timeout you may need to increat the timeout

itā€™s strange when i run the addon i get
2019-11-20T18:29:10Z E! [inputs.ipmi_sensor] Error in plugin: failed to run command /usr/bin/ipmitool -H 192.168.1.2 -U user -P password -I lan sdr: exit status 1 - Error: Unable to establish LAN session
Error: Unable to establish IPMI v1.5 / RMCP session

i assume because i donā€™t actually have the right thing for the sensor to work. but when i push an update to add a new feature later i will include this in the update the double quotes and let me know if it works, I am going to setup a dev branch i think too.

0.4.4 has been released upgrade and let me know :slight_smile: there are some changes to the config this version too. Someone requested username and password to be optional, I have also changed retention policy to optional

1 Like

Hi all, just a quick update.

I have released V0.5.2 this should fix all of the errors above and add some new features :slight_smile:

let me know what you think

Thanks for the work on this! Any possibility to open incoming ports for a push model eg Service Input cisco_telemetry_mdt on port 57000?

I will have to look at exposing ports through the config Iā€™m not sure if this is possible or not

Hi Sabuto,
Great addon. I have issues setting it up and hope you can help me.
I have HASSIO installed on Virtual Box Machine. Also Grafana and InfluxDB working perfectly.
But Telegraf addon doesnā€™t get to write any output on InfluxDB (it successfully created a database but it is empty)
The log from the addon startup is:

[15:11:06] INFO: Updating config
[15:11:06] INFO: Updating config for Kernel
[15:11:06] INFO: Updaing config for Swap
[15:11:06] INFO: Updating config for Docker
[15:11:06] INFO: Updating config for Smart Monitor
[15:11:06] INFO: Updating config for thermal zone sensors
[15:11:06] INFO: Finished updating config, Starting Telegraf
2020-04-11T13:11:06Z I! Starting Telegraf 1.13.2
2020-04-11T13:11:06Z I! Using config file: /etc/telegraf/telegraf.conf
2020-04-11T13:11:06Z I! Loaded inputs: linux_sysctl_fs sensors docker smart disk interrupts netstat kernel processes system net diskio mem internal nstat cpu swap swap
2020-04-11T13:11:06Z I! Loaded aggregators:
2020-04-11T13:11:06Z I! Loaded processors:
2020-04-11T13:11:06Z I! Loaded outputs: influxdb
2020-04-11T13:11:06Z I! Tags enabled: flush_interval=10s host=test
2020-04-11T13:11:06Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:ā€œtestā€, Flush Interval:10s
2020-04-11T13:11:10Z E! [inputs.sensors] Error in plugin: failed to run command /usr/bin/sensors -A -u: exit status 1 - No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
2020-04-11T13:11:20Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 500 Internal Server Error: retention policy not found: null
2020-04-11T13:11:20Z E! [agent] Error writing to outputs.influxdb: could not write any address

I already tried to specify retention policy, but this changes nothing. As mentioned, I can see telegraf DB is created at InfluxDB.

What coulbe wrong?
Thanks.

I seem to have gotten Telegraf working with the add-on and an external .conf file as well.
However I want to use Telegraf with my EdgeRouter X, but I assume since we do not have options to expose ports this add-on is internal only to the Home Assistant host and cannot currently be used external of that host.

Is that correct?
And if so can you continue to review how to map ports outside the host as other add-onā€™s can do this.

Thanks!

Sorry for the late reply, this is because of the retention policy. For now set up a retention policy and Iā€™ll look into making it optional further down the line (bug fix)

Hey, glad you like it, if you could point me to which addons do this Iā€™ll take a look and see if I can figure something out :slight_smile:

Thanks very much Sabuto. Working!

1 Like

Hi Sabuto!

This is one example of an add-on that exposes ports on the host so external clients have access: https://github.com/home-assistant/hassio-addons/blob/1b29439008720cb3538602112af881cd52b2193b/mosquitto/README.md

Hope it helps you and is not too much work.

Thanks for the job so far!

Looks like I am getting the same error. I have changed the value for the Retention Policy in the telegraf DB
image

What am I missing?
Thanks

Also, has anyone managed to use this add-on to monitor a Synology NAS? Iā€™m struggling with getting the MIBs loaded up. I think this add-on needs to copy some folder in the right location: /usr/share/snmp/mibs for example

see example here:

Thanks

What does your config for the addon look like?

Iā€™ll take a look into this also :slight_smile:

I ended up giving up and running telegraf in Docker myself.
That way I could mount my files that are required and telegraf is happy.
I have managed to get telegraf to monitor my NAS through SNMP