Hello everyone,
I have a strange problem or maybe i didnt get a thing about notification.
I have a very simple script that search if a directory contains file or not.
Typically this is a : find FOLDER | wc -l
If the return is greater than 0, i will echo the name of file ending all by a special string "Topics in queue".
Exemple of script return :
----
/folder/file1
/folder/file2
Topics in queue
----
My zabbix trigger is checking if the string "Topics in queue"
topic.str("Topics in queue")}=1
Now here is what's happening.
Let's say a file exists in /folder
The trigger will raise and i will have a mail with the following content
----
/folder/file1
Topics in queue
----
Right after a second file is written in /folder.
In the mail i'm having exactly the same output as the 1st error which is not good, i'd like to have ALL file returned by the script.
Anyhow, when i'm going to check the last data of the host in Zabbix, i'm seing the exact output of the script, so :
----
/folder/file1
/folder/file2
Topics in queue
----
What am i doing wrong ?
It seems that as long as you dont have the alert back to ok, the email notification will be exactly the same as the one that raise the alert, no matter if the output of the script change or not.
The other problem with that if i'm going to delete the file1, the trigger is still not ok because of file2. But the mail i'm receiving still output the file1.
Any idea ?
Thanks
I have a strange problem or maybe i didnt get a thing about notification.
I have a very simple script that search if a directory contains file or not.
Typically this is a : find FOLDER | wc -l
If the return is greater than 0, i will echo the name of file ending all by a special string "Topics in queue".
Exemple of script return :
----
/folder/file1
/folder/file2
Topics in queue
----
My zabbix trigger is checking if the string "Topics in queue"
topic.str("Topics in queue")}=1
Now here is what's happening.
Let's say a file exists in /folder
The trigger will raise and i will have a mail with the following content
----
/folder/file1
Topics in queue
----
Right after a second file is written in /folder.
In the mail i'm having exactly the same output as the 1st error which is not good, i'd like to have ALL file returned by the script.
Anyhow, when i'm going to check the last data of the host in Zabbix, i'm seing the exact output of the script, so :
----
/folder/file1
/folder/file2
Topics in queue
----
What am i doing wrong ?
It seems that as long as you dont have the alert back to ok, the email notification will be exactly the same as the one that raise the alert, no matter if the output of the script change or not.
The other problem with that if i'm going to delete the file1, the trigger is still not ok because of file2. But the mail i'm receiving still output the file1.
Any idea ?
Thanks