Ad Widget

Collapse

Actions Not Triggering with Certain (or no) Templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dbq-andersons
    Junior Member
    • Apr 2023
    • 11

    #1

    Actions Not Triggering with Certain (or no) Templates

    Greetings Everyone,

    Still learning my way around Zabbix, so please be gentle. Running Zabbix version 6.4.1 on RedHat Enterprise Linux 8.6.

    I am trying to set up custom templates for some per-SID Oracle monitoring (please don’t respond with ‘just use the agent.’ Some of the databases I’m monitoring are too old for the agent and I’m looking to standardize monitoring as much as I can across all of them). I have a host (onolx02 in my images) configured with the Linux by Zabbix agent template. That is the database server itself. I have a second host (onolx02-clart in my images) configured for grabbing data from a single instance on that server. The onolx02-clart host currently has no template assigned (same interface type (agent) and DNS address as the onolx02 host) . . . although I am seeing this behavior even if I have a custom template assigned to onolx02-clart.

    Among other scripts, I have written a check to run a script on the onolx02 to grab the current session count and return the current count. For testing/troubleshooting purposes, I have that item/trigger configured on both the onolx02 and onolx02-clart hosts. When I artificially lower the threshold enough to trigger an event, the trigger fires an action on the onolx02 host, but not the onolx02-clart host.


    Click image for larger version

Name:	2023-04-28_123159.jpg
Views:	392
Size:	26.0 KB
ID:	463785
    Click image for larger version

Name:	2023-04-28_123215.jpg
Views:	290
Size:	30.8 KB
ID:	463786
    Click image for larger version

Name:	2023-04-28_123731.jpg
Views:	289
Size:	30.4 KB
ID:	463787

    This happens with any script I assign to an onolx02-$DBSID host in this way. As far as I can see, the only difference between the hosts that do work and the hosts that don’t is that onolx02 has the Linux by Zabbix template assigned and onbolx02-clart does not. I've looked/searched through the documentation and interwebs, but can't figure this one out. Although, I did just have a thought as I'm typing . . . Since I am using the agent interface type in the host configuration, do I need to include the "Linux by Zabbix agent" template on that host (even though I'm already grabbing that data with the server entry (onolx02 in my example)) for things to work properly? Is that what I'm running into? Something else?

    Let me know if any other information would help.

    Cheers,

    Bill Anderson

  • dbq-andersons
    Junior Member
    • Apr 2023
    • 11

    #2
    UPDATE:

    After much against-the-wall head beating, it came down to a permissions issue with the target user for the action.

    I had originally set up this notification-only user with pretty locked-down permissions. I had to change the user type from "User" to "Super Admin" user type on the "User Roles" screen to get things working the way I want them to (as described above).

    Gotta admit this wasn't where I was expecting to find the problem. Although this "solves" my issue, If anyone could shed some light on the "why," I'd appreciate it.

    Cheers,

    Bill

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      First think is always to check, is your notification user having enough rights, does it "see" that host and its problems... Ordinary user sees only limited set of data from the host groups, what are allowed for this users user groups... Kind of usergroup/hostgroup matrix... SuperAdmin sees everything without any restrictions... So if you initially locked down your notification user, then I assume it only sees one host and not the other. and then action is not triggered for that other host. Are they in different hostgroups?
      You also do not tell us, what conditions you have set in your action... There might be something that applies only to one host and not for another...

      Comment

      • dbq-andersons
        Junior Member
        • Apr 2023
        • 11

        #4
        Thanks, Cyber for taking a moment to get back to me.

        The two hosts in question are in different host groups, yes. So, that is another variable to look at.

        The condition for the action is a system.run item for a script that grabs the current number of sessions for a given Oracle instance. If the session count is over a given threshold (say 200), then alert at a high. Both hosts in question were configured for the same item against the same database in my testing. I artificially set the threshold low enough to trigger the action and was getting the inconsistent results mentioned in my original post until I boosted the notification user's permissions. I will continue to compare the two and dig a little deeper into what's going on.

        Thanks for the advice!

        Bill

        Comment

        Working...