Hi !
I want to extract value from a log file, and then create trigger based on last value time.
My log file looks like :
Is it possible to auto create item to graph the "nbr enr".
for example :
key = IDFILE type uint and fetch the value 422
key = IDFILE2 type uint and fetch the value 20
I have created a log item
log[C:\path\to\file.log, "idf=(.*) nbr enr=",,,,\1]
And i can get all the id file, but not the "nbr enr" value corresponding.
After that, i want to create trigger to alert when I don't receive or send a file for more than 24h hours (86400 seconds).
my expression should be like :
{hostname:log[C:\path\to\file.log,"idf=(.*) nbr enr=",,,,\1].str(IDFILE).fuzzytime(86400)}
but it doesn't work.
I see a comment on this article that say it may be possible ti create calculated items based on output of log items.
Any suggestion appreciated..
Thanks,
Thierry.
I want to extract value from a log file, and then create trigger based on last value time.
My log file looks like :
Code:
* RECEPTION OK ** Fichier D:\path\to\file reçu de PARTENAIRE, idf=IDFILE nbr enr=422 , le 201311127 à 133515 * ENVOI OK ** Fichier D:\path\to\file2 envoyé vers PARTERNAIRE2, idf=IDFILE2 nbr enr=20 , le 20131129 à 103443
for example :
key = IDFILE type uint and fetch the value 422
key = IDFILE2 type uint and fetch the value 20
I have created a log item
log[C:\path\to\file.log, "idf=(.*) nbr enr=",,,,\1]
And i can get all the id file, but not the "nbr enr" value corresponding.
After that, i want to create trigger to alert when I don't receive or send a file for more than 24h hours (86400 seconds).
my expression should be like :
{hostname:log[C:\path\to\file.log,"idf=(.*) nbr enr=",,,,\1].str(IDFILE).fuzzytime(86400)}
but it doesn't work.
I see a comment on this article that say it may be possible ti create calculated items based on output of log items.
Any suggestion appreciated..
Thanks,
Thierry.

Comment