Simple cat with dot

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Mandro
Posts: 1
Joined: Tue Jan 10, 2017 3:49 am

Simple cat with dot

Post by Mandro »

Hello,

I have one problem using cacti, which might be caused by my low knowledge about cacti. Maybe someone has a hint for me.

I want to display the temperature in cacti. Considering the fact that the temperature needs to be fetched by a complex script via ssh etc. etc. all work is already done. This means that the final temperatur is already written at the file /tmp/output_dht22_temperatur.

So all I did was to create a "Data Input Method" and add "cat /tmp/output_dht22_temperatur" to the input string.
Unfortunately I am not able to get any result. I only see in the logs the following error message "WARNING: Result from CMD not valid. Partial Result: U "

When I run the cat-command directly in a bash I receive the following output.

Code: Select all

cat /tmp/output_dht22_temperatur
17.3
When I change the content for "output_dht22_temperatur" to "17" (so deleting the .3) all is working fine.
I already checked if there are no printable characters within the content that could cause the problem but there is no non printable character.

Code: Select all

cat -A /tmp/output_dht22_temperatur
17.3$
I am happy for every hint.

BR Mandro
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Re: Simple cat with dot

Post by JorisFRST »

Is your cacti server set to use a dot or a comma for decimal ?

In Europe it's common to have this set to , and as you are importing this from another server, this might be using the dot... thus making no sense to your cacti server.
Joris.
http://www.routerjanitor.com
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests