NetXMS Support Forum

English Support => General Support => Topic started by: mapsy on November 23, 2010, 10:51:19 AM

Title: Logfile: Alarm if last line is more than 24 hours
Post by: mapsy on November 23, 2010, 10:51:19 AM
Hello,

I want to setup an alarm if the last line written in a logfile is more than 24 hours ago.

I have made an event when the file is written. So far so good.

Now I want an alarm if this event is more than 24 hours ago.

How to setup? Can an event be a DCI?

Thanks,
Maurice Spronkers
Title: Re: Logfile: Alarm if last line is more than 24 hours
Post by: Victor Kirhenshtein on November 23, 2010, 03:00:10 PM
Hi!

You can use situations in conjunction with dummy DCI. For example, you can update situation object each time you got line from a log, setting situation's attribute to current time stamp. Then, create dummy DCI with transformation script, check situation's attribute, and return different values depending on how long time was passed since last situation update, and set thresholds as usual. And starting from 1.0.8, you will be able to generate new event directly from transformation script.

Best regards,
Victor