[ZBX-11558] when updating Discovery trigger in the template they are not updated in the hosts Created: 2016 Dec 05  Updated: 2017 May 30  Resolved: 2017 Jan 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 3.2.1
Fix Version/s: 3.0.8rc1, 3.2.4rc1, 3.4.0alpha1

Type: Incident report Priority: Critical
Reporter: Artem Sabantsev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: templates, triggers
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

centos 7



 Description   

when i updated the discovery trigger in the template, this trigger in the host not updated.

for example i updated:
1. dependings - they are updated on template, but not updated at bound hosts
2. generation: once or many times - they updated in both places, but sending email notify happens on each recieve new data;

This problem started in version 3.1.0 and after upgrade to 3.2.1 is not lost.
perhaps the new version is not it will manifest itself as before.



 Comments   
Comment by Aleksandrs Saveljevs [ 2016 Dec 05 ]

I have managed to reproduce the first problem with dependencies with the latest Zabbix 3.2, so setting to "Confirmed". If we add dependencies to a trigger prototype in a template, they will be added by Zabbix server to discovered triggers the next time LLD runs. However, if we clear dependencies from a trigger prototype in a template, then they will remain on discovered triggers on a host.

The second problem, I could not reproduce. If you could provide exact steps, that would be wonderful.

Comment by Artem Sabantsev [ 2016 Dec 06 ]

1. Create Action by Trigger
Configuration -> actions -> triggers -> new
Name: HDD is Low
Calc A and B
Conditions:
A -> Maintenance status not in maintenance
B -> Trigger name like Free disk space is less than 5%
Operations: Send message to users: Artem S. (Артем Сабанцев) via Email Immediately Default

2. Create LLD Item & trigger
item:
Free disk space on {#FSNAME} (percentage)
vfs.fs.size[{#FSNAME},pfree]
interval: 60 sec (I was set to 1 hour, but the notice came every minute!)

trigger:
Free disk space is less than 5% on volume {#FSNAME}
{Template OS Linux active agent:vfs.fs.size[{#FSNAME},pfree].last()}<5
Expression / Multiple / All problems

3. let's tie template to the host to create a new trigger (not to be updated)
4. watch the mailbox for notify.
5. when we see that the letters come, let's change triggers option "PROBLEM event generation mode" from Multiple to Single. Save
6. watch the mailbox again. if the letter will be sent, then the problem is confirmed. if not, then the problem is fixed earlier.
6.1 if the letter will be sent, let's change item prototype interval from 60 sec to 1 hour, and check the mailbox again. (i was getting new letter every 1 minute)

Comment by Aleksandrs Saveljevs [ 2016 Dec 06 ]

Thank you! What is the update interval for your LLD rule? Have you waited for it to execute? When you update item and trigger prototypes on a template, item and trigger prototypes on a host will be updated immediately. However, discovered items and triggers will only be updated the next time your LLD rule runs.

Comment by Artem Sabantsev [ 2016 Dec 06 ]

vfs.fs.discovery is updated per 1 hour.

the first email message i received at 7:15, and last on 8:57.
after it, I switched off the email-notifier (Action by Trigger)

>> However, discovered items and triggers will only be updated the next time your LLD rule runs.
It is very strange! I just checked, and I can say with confidence that the trigger prototypes is updated immediately after you update it in template. without waiting for the next request LLD.

and in spite of this, if a request and receive a response occurs once an hour, why sending emails is happening at every minute? May be Action by Trigger continually checks the available data, rather than waiting for new?

Comment by Aleksandrs Saveljevs [ 2016 Dec 06 ]

>> However, discovered items and triggers will only be updated the next time your LLD rule runs.
It is very strange! I just checked, and I can say with confidence that the trigger prototypes is updated immediately after you update it in template. without waiting for the next request LLD.

Yes, you are correct. Trigger prototypes on the host are updated immediately after you update the template. But discovered triggers are only updated the next time LLD rule runs, which in your case is once per hour.

Comment by Artem Sabantsev [ 2016 Dec 06 ]

tell me please, what do you mean when says "discovered triggers"? how they differ from "trigger prototypes"? may be you give a screenshot?

или может быть по русски? было бы гораздо понятнее а то два русских общаются на Английском...

Comment by Aleksandrs Saveljevs [ 2016 Dec 06 ]

"Trigger prototypes" are what you see in host -> "Discovery rules" -> rule -> "Trigger prototypes".

"Discovered triggers" are what you see in host -> "Triggers" (i.e., these are triggers that were created from trigger prototypes).

Please see https://www.zabbix.com/documentation/3.0/ru/manual/discovery/low_level_discovery for more information on low-level discovery.

We cannot switch to Russian, because this is not a support area, but rather a bug tracker. A bug tracker is read by many different people, including those from Brazil and Japan, and it would be a bit hard for them to understand Russian. See also https://www.zabbix.org/wiki/Docs/bug_reporting_guidelines#Reporting_an_issue .

If you wish to switch to Russian to discuss this issue, you are welcome to contact me at MyFirstName-dot-MyLastName-at-Zabbix-dot-com.

Comment by Artem Sabantsev [ 2016 Dec 06 ]

Now I understand why I can delete a discovered item thank you!
This way I use to delete a wrong / error item, so that later they will create again.

But I did not understand, the error with the notification on an discovered triggers - it is relevant? like on the situation it has been more than an hour, discovered item had to be renewed, but the notice still to come.

Comment by Aleksandrs Saveljevs [ 2016 Dec 06 ]

If you can reproduce the issue, making sure that LLD rule was processed after you updated trigger prototypes, then yes, it is relevant.

You can try with a short LLD rule update interval (e.g., 30 seconds) and a short configuration cache update interval (CacheUpdateFrequency=60).

Comment by Artem Sabantsev [ 2016 Dec 07 ]

I checked the second point, related to email notifications, and you are right. The problem is that the Discovered triggers are recreated every hour (discovery rule updates once per 1 hour), and the trigger itself requested data every minute, so I got a new notification every minute.

thanks for the help waiting for fixing the first problem

Comment by Viktors Tjarve [ 2016 Dec 12 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-11558

Comment by dimir [ 2016 Dec 19 ]

The fix looks fine to me.

Comment by Viktors Tjarve [ 2016 Dec 23 ]

Released in:

  • 3.0.8rc1 r64702, r64717.
  • 3.2.4rc1 r64703, r64718.
  • 3.3.0 r64704, 64718.
Generated at Fri Apr 26 17:45:03 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.