How to find trigger ID in Zabbix GUI? - zabbix

Is it possible to find a trigger's ID in the GUI or is it only possible via the API?
Also, does the ID refer to the trigger on a template level or host?
Can I just disable the trigger on a host and not on the entire template?

Is it possible to find a triggers ID in the GUI or is it only via the API?
Open a trigger configuration and check "triggerid" in the URL.
Also does the ID refer to the trigger on a template level or host?
In the previous step, if you have opened a trigger at the host level, the trigger ID is for the host trigger. If you have opened a trigger at the template level, the trigger ID is for the template trigger.
Id can I just disable the trigger on a host and not the entire
template?
Yes, you can. When viewing triggers for a host, just click "Enabled" link on the right of the trigger. Alternatively, select multiple triggers and choose "Enable selected" on the bottom left.

Related

how to edit a trigger set by another user on google apps script

I have a trigger set by another user. I tried to edit or delete it but there is no option for that actions. See the picture below. Is there any way to edit it?
Apps Script triggers belong to the user who created them so unfortunately there is no direct way for you to edit/delete those triggers.
Possible solution
If the account of the user who created the triggers is under the same G Suite domain you should be able to contact your G Suite administrator in order to reset their password. In this way, you may be able to get access to the new credentials and change the triggers yourself.

GAS all Triggers disabled suddenly. why?

all my GAS triggers (time based) in all my projects are disabled:
checking the trigger page shows a red "Disabled" under "last run"
and text inside says:
Disable reason
You do not have access to the target script.
can someone explain what is going on?
The error you obtained is caused by the following constellation
User A created a file
User A shared his file with user B
User B either created a bound script and attached an time-driven trigger to the script, or User B attached a time-driven to the script created by user A
User A stopped sharing the file with user B
User B is not allowed anymore to use a trigger on User A's file
User B's triggers become disabled and show the Disable reason "You do not have access to the target script."

How can I create a "Create Triggers" add-on menu option UNLESS the installed triggers already exist?

From Google:
If an add-on is either installed for the current user or enabled in the current document, the add-on is loaded in the document, which causes it to appear in the Add-ons menu and start listening for the simple triggers onInstall(e), onOpen(e), and onEdit(e)
When running the onOpen simple trigger, the the auth mode is at best LIMITED, meaning you get the following error when trying to check on the user installed triggers:
You do not have permission to call ScriptApp.getUserTriggers. Required permissions: https://www.googleapis.com/auth/script.scriptapp
So, we can create a menu item which says "Create Triggers" where the user can click on, and we'll be in FULL auth mode then. Only problem with this is, it would be ideal if the "Create Triggers" menu option did NOT appear IF the triggers already exist.
One possible solution, which Google seems to hint at in their documentation, is to set a property whenever the installed triggers are created. Then, the simple onOpen trigger can just create the "Create Triggers" menu option only if the property has been set. However, a user could accidentally delete the installed triggers manually without clearing the property, which would prevent the user from ever seeing the "Create Triggers" menu option again - a severely broken state.
Another possible solution is to create an additional installed onOpen trigger to help set the menu items. However, this creates a race condition between the simple onOpen trigger, and the installed onOpen trigger - both accessing the same add-on menu. Making things much worse, there doesn't seem to be a way to "read" the add-on menu - making no reliable way to communicate whether installed triggers exist to the simple onOpen trigger.
I am currently trying to resolve the race condition using both the LockService and PropertiesService.
There must be an easier solution - I don't understand why this is so difficult.

Google script triggers authentication

I have created trigger programmatically on the user's profile. It's working as required since couple of months.
Last week I have changed the code of trigger program and published. But still, users are getting authentication pop up.
Do I need to programmatically delete the existing trigger of all users profile and create again?
Or any other option could you suggest

How do I get a trigger to run for every editor

I am trying to build a method for creating a shared contact group. The API's are there so that if an editor clicks snyc contacts it can snyc with "Their" own contacts. But I am not sure how to make that work as an automated trigger. I am OK with each editor authorizing, but can each one have their own timed trigger?
UPDATE: This issue is moot as each trigger is already set to the users.
It is not possible in Apps Script to have a script that allows a user to create triggers for other users directly.
As stated, it is possible to create a menu item or UI control that will allow users of a script/add-on to create triggers for themselves. The Form Notifications add-on has an example of this, where a sidebar control creates or removes form submit triggers for the user of the add-on.