Ad Widget

Collapse

Action no lauched

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sujiga
    Junior Member
    • Jun 2020
    • 7

    #1

    Action no lauched

    Hello everyone, I am very new with this product and I am trying to configure my lab environment to test it and decide if this solution is that we need to manage our systems.

    So, I am configuring different things with the video, de guide, and the forum information, but I am very stuck with the configuration of actions.
    I am monitoring the status of some Linux service with a systemctl application, and by the moment I only have activated the postfix service like a tester.


    This is the trigger activates the alarm when the postfix service is down:
    Click image for larger version

Name:	trigger.jpg
Views:	371
Size:	173.6 KB
ID:	403885




    And when I shut down the postfix service I have an alarm. I configured an action to Zabbbix automatically start the postfix service when it is down:
    Click image for larger version

Name:	action_condition.jpg
Views:	347
Size:	69.6 KB
ID:	403886




    Click image for larger version

Name:	action_operation.jpg
Views:	347
Size:	82.8 KB
ID:	403887

    But the situation is when the alarm is active no action is launched by Zabbix, it seems like the condition is not working because I can launch the same command form zabbix server command line and It works because the service start but never zabbix run this command itself.
    Click image for larger version

Name:	zabbix_get.jpg
Views:	347
Size:	30.2 KB
ID:	403888



    Anyone know what can I do wrong?


    Saludos,

    Susana
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Is your zabbix agent configured with EnableRemoteCommands set to 1? Check the agent log at the time the action runs.

    I don't think your system.run is considered a remote command in the same way as the action.

    Comment

    • sujiga
      Junior Member
      • Jun 2020
      • 7

      #3
      Hello!

      Thanks for your help.


      yes, this is reviewed, super reviewed.
      Click image for larger version

Name:	uno.jpg
Views:	364
Size:	27.6 KB
ID:	403993





      I can test the status of service or stopped it or started it from Zabbix server CLI:

      Click image for larger version

Name:	dos.jpg
Views:	327
Size:	99.9 KB
ID:	403994




      So, there is not any permission problem.

      What happened in my opinion? Well, if I'm not mistaken when the conditions of the action comply the action should be launched, correct?. Then even the script or the permission is wrong, there should be any item in the Action column, but it always is empty. I think the problem is the action never has launched. The Systemctl is a template that I got it from the Zabbix web to monitor the Linux services

      Click image for larger version

Name:	tres.jpg
Views:	377
Size:	69.7 KB
ID:	403995




      Thanks again!!

      Saludos,

      susana


      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I think you're on the right track, sujiga , with the idea that the problem is your action conditions, not what the action is actually supposed to do. As you've identified, if there is nothing in the "Actions" area for the Problems display, then Zabbix hasn't taken any action, probably because something about your conditions does not match.

        In the "Applications" box for the item, is "systemctl" set?

        Comment

        • sujiga
          Junior Member
          • Jun 2020
          • 7

          #5
          Yes, But I still don't understand why it doesn't work.

          I mean, I can select directly the trigger in the action condition. It shouldn't allow any error, is this trigger specifies, not the other one.


          Click image for larger version

Name:	uno.jpg
Views:	341
Size:	188.0 KB
ID:	404025






          The action filter only contains the trigger and the host (I tried other items, but it has never worked).



          Click image for larger version

Name:	dos.jpg
Views:	317
Size:	71.2 KB
ID:	404026




          Do you know what is most estrange for me? When I start the postfix service again in the local server:
          Click image for larger version

Name:	tres.jpg
Views:	357
Size:	20.7 KB
ID:	404027


          Then, The action is completed. I don't know if this is normal behavior, for me is weird.

          Click image for larger version

Name:	cuatro.jpg
Views:	337
Size:	276.4 KB
ID:	404028






          Saludos,

          Susana




          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            Originally posted by sujiga
            [SIZE=16px][FONT=Arial]Yes, But I still don't understand why it doesn't work.
            You didn't answer the question I asked about how the item was configured, specifically which Application was set.

            Originally posted by sujiga

            The action filter only contains the trigger and the host (I tried other items, but it has never worked).



            Click image for larger version

Name:	dos.jpg
Views:	317
Size:	71.2 KB
ID:	404026
            That is a different Action than the one that you showed earlier. It no longer contains the "Application contains systemctl" condition. That's why I was asking about your item, and what Application was assigned at the item level

            Comment

            Working...