[Solved] graf and alert on data from temperature weblog

Started by Goriem, March 23, 2012, 11:05:12 AM

Previous topic - Next topic

Goriem

Hi

i have a temperature monitoring device that logs temperature to an onboard log file accessible over web like this : http://ipadress/spilog.txt

i logs the temperature ever 5 minutes in this format:

2012/03/23;09:35:00;0;3;3;1;0;2;0;3;0;
2012/03/23;09:35:00;0;4;2;151;0;152;0;
2012/03/23;09:40:00;0;0;1;59300;276;
2012/03/23;09:40:00;0;3;3;1;0;2;0;3;0;
2012/03/23;09:40:00;0;4;2;151;0;152;0;
2012/03/23;09:45:00;0;0;1;59300;276;
2012/03/23;09:45:00;0;3;3;1;0;2;0;3;0;
2012/03/23;09:45:00;0;4;2;151;0;152;0;
2012/03/23;09:50:00;0;0;1;59300;277;
2012/03/23;09:50:00;0;3;3;1;0;2;0;3;0;
2012/03/23;09:50:00;0;4;2;151;0;152;0;
2012/03/23;09:55:00;0;0;1;59300;276;
2012/03/23;09:55:00;0;3;3;1;0;2;0;3;0;
2012/03/23;09:55:00;0;4;2;151;0;152;0;
2012/03/23;10:00:00;0;0;1;59300;275;
2012/03/23;10:00:00;0;3;3;1;0;2;0;3;0;
2012/03/23;10:00:00;0;4;2;151;0;152;0

now i would like to collect info from: where i can identify the temp monitor and current value
2012/03/23;10:00:00;0;0;1;59300;275;
device---------------------------^
current value----------------------------^  <- in this case the temperature is 27,5 degrees celcius

what approach is the best in order log log and alert based upon these values?

regards

Victor Kirhenshtein

I would create a script which will get the file, parse it, and push values to NetXMS server using nxpush command. Then you can work with the values as usual - set thresholds, show history, etc.

Best regards,
Victor

Goriem

Thankyou Victor for your reply - do you have any links to this sort of thing - using nxpush and scripting to get values? - i have searched the forum but i might not know what to search for. i quite new with this advanced (for me anyway) usage of Netxms

Goriem

I ended up solving it via externalparameter, wrote a vb script to parse the value from the weblog and returning it to the node works like a charm allthough i had to restart the Netxms core server before i could "rearm" the value when falling below configured threshold.

Victor Kirhenshtein

Quote from: Goriem on March 29, 2012, 03:12:49 PM
I ended up solving it via externalparameter, wrote a vb script to parse the value from the weblog and returning it to the node works like a charm allthough i had to restart the Netxms core server before i could "rearm" the value when falling below configured threshold.

Can you show me configuration of your thresholds? That should not require server restart.

Best regards,
Victor

Goriem

sorry i have nowhere to store image online right now - but my threshold is set to:

This threshold will be activated if last polled value for 1 consecutive samples will be greater or equal than 30

repeat event Use default settings

Victor Kirhenshtein

What events are generated on activation and deactivation of the threshold? Could you check than in case when value goes back to normal level deactivation event is generated or not?

Best regards,
Victor