hypermike
Contributor
Contributor

how is hyperic monitoring a file (or log file) for alerts

1. Can I use hyperic to run a script on the hyperic server(3.02 open source ubuntu linux)
at some interval of time. Or do I have to use cron on the linux box ???

2. If I run a script that creates a new file with the same name every say 5 min which creates a status file of all the switches and routers at our site and show failed or ok. Can I use the alert options if it fails 3 times in 15 min ??? Or because the file is recreated each time will that mess up hyperic logic. I have created a alert looking at the file for failures and have
successfully fired off an alert (that specifys whenever the condition (failure occurs in the lines), but when I say alert me if this failure occurs 3 times in 15 min . I dont get alerts even though I recreated the file 3 times with failures.
0 Kudos
4 Replies
hypermike
Contributor
Contributor

In addition to the above question . Is the hyperic log query doing a tail . Or if the log file
is re-created every 5 min as in my case does it just go through the whole log again from the beginning every time it is created. Since the log is NOT appended to in my case will future
entried in the same file name file be added to a counter in case I say in the alert if an entry
appears 3 times in 15 minutes. Not sure HOW the log query by Hyperic is doing its stuff.
Can anyone shed any light on this. Trying to setup a demo for networking group.
0 Kudos
hypermike
Contributor
Contributor

Can anyone look at this question . It should be something that any Hyperic person would know.. DOES hyperic when looking at a log file for a string use Tail, or does it read the whole file each time . If I have an alert that says if it sees a fail string 3 times in 15 min. Does Hyperic mark the time for the 1st one and then total then for the next 15 min . Then start over after the 1st 15 min is up ???
0 Kudos
ama_hyperic
Hot Shot
Hot Shot

1. You could create a control action for your script by adding a new 'file server file' as a platform service on that machine.

2. I'm not sure if the agent grabs a file handle on the log and if it would lose it if its recreated every 15 minutes, maybe someone else can answer that questions.

The agent is doing the equivalent of a tail -f.

It would mark the 1st occurrence and then count the number of recurrences till that 15 minutes is up and then start over.
hypermike
Contributor
Contributor

Thanks so much for spending time to respond. Your commentrs helped.
0 Kudos