NetXMS Support Forum

English Support => General Support => Topic started by: Goriem on March 23, 2012, 11:05:12 AM

Title: [Solved] graf and alert on data from temperature weblog
Post by: Goriem on March 23, 2012, 11:05:12 AM
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
Title: Re: graf and alert on data from temperature weblog
Post by: Victor Kirhenshtein on March 24, 2012, 05:18:36 PM
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
Title: Re: graf and alert on data from temperature weblog
Post by: Goriem on March 28, 2012, 01:14:56 PM
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
Title: Re: graf and alert on data from temperature weblog
Post by: 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.
Title: Re: graf and alert on data from temperature weblog
Post by: Victor Kirhenshtein on March 29, 2012, 04:28:40 PM
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
Title: Re: [Solved] graf and alert on data from temperature weblog
Post by: Goriem on April 10, 2012, 04:21:31 PM
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
Title: Re: [Solved] graf and alert on data from temperature weblog
Post by: Victor Kirhenshtein on April 10, 2012, 06:52:03 PM
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