amon icon indicating copy to clipboard operation
amon copied to clipboard

negative values not display correctly on graph with custom plugin

Open djsakisd opened this issue 8 years ago • 2 comments

Hi

I created some custom plugins for some graphs i need.. There are 2 values reported here : min & max and both have negative values.

In graphs only one negative value is reported as graph.. for example if the 2 values are -3 & -9 only -3 is displayed on graph.

If i revert the values to be possitive (ex 3 & 9 ) they are graphed fine.

Output from plugin on agent reports fine and also if i create some counters they report fine.. so only issue is the graphs..

djsakisd avatar May 11 '17 09:05 djsakisd

@djsakisd Can you please paste me the output from your custom plugin and I will take a look

martinrusev avatar May 11 '17 12:05 martinrusev

Hi @martinrusev and thanks for quick reply

Here's the output : $/opt/amonagent/amonagent -test-plugin=custom {"db":{"gauges":{"db.peak_left":-2.76,"db.peak_right":-2.76,"db.rms_left":-10.56,"db.rms_right":-10.56},"counters":{"db.peak_left":-3,"db.peak_right":-3,"db.rms_left":-11,"db.rms_right":-11}},"frequency":{"gauges":{"frequency.arm":1200,"frequency.core":400},"counters":{"frequency.arm":1200,"frequency.core":400}},"temperature":{"gauges":{"temperature.cpu":49.4},"counters":{"temperature.cpu":49.4}},"voltage":{"gauges":{"voltage.core":1.3188,"voltage.sdram_c":1.2,"voltage.sdram_i":1.2,"voltage.sdram_p":1.225},"counters":{"voltage.core":1318,"voltage.sdram_c":1200,"voltage.sdram_i":1200,"voltage.sdram_p":1225}}}

djsakisd avatar May 11 '17 14:05 djsakisd