Ad Widget

Collapse

my action didn't execute when the trigger is TRUE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lth0721
    Junior Member
    • Oct 2009
    • 11

    #1

    my action didn't execute when the trigger is TRUE

    a create a sh script named a.sh
    #!/bin/bash
    echo "$@">/home/zabbix/a.txt
    and then add a media type echo

    and also add the media echo for user test

    then add a trigger for host 10.0.1.8

    the add the action test2 for host 10.0.1.8

    but when the smtp server down on 10.0.1.8,the action didn't execute...

    help me..
    Attached Files
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    Hi.

    When using Recovery messages it's mandatory to add the Action condition:
    Trigger value = "PROBLEM"

    Try unchecking 'Recovery message'

    Does your file have the correct permissions?

    Comment

    • lth0721
      Junior Member
      • Oct 2009
      • 11

      #3
      thanks for you reply,zen.
      I unchecked the 'Recovery message'
      and the file also have rigth privileges
      but unfortunately the action still didn't execute
      my zabbix version is 1.6.6,is that a bug?

      [zabbix@localhost ~]$ ll /home/zabbix/a.txt
      -rw-r--r-- 1 zabbix zabbix 0 10-29 09:02 /home/zabbix/a.txt
      [zabbix@localhost ~]$ ll /home/zabbix/bin/a.sh
      -rwxrwxr-x 1 zabbix zabbix 41 10-28 14:08 /home/zabbix/bin/a.sh
      Attached Files

      Comment

      • lth0721
        Junior Member
        • Oct 2009
        • 11

        #4
        by the way
        I only find this info in /tmp/zabbix_server.log,is there something wrong with my set,,I think there should be more info..
        6375:20091029:055454 Executing housekeeper
        6375:20091029:055457 Deleted 0 records from history and trends
        6375:20091029:065557 Executing housekeeper
        6375:20091029:065600 Deleted 0 records from history and trends
        6375:20091029:075700 Executing housekeeper
        6375:20091029:075703 Deleted 0 records from history and trends
        6375:20091029:085803 Executing housekeeper
        6375:20091029:085805 Deleted 0 records from history and trends
        6375:20091029:095905 Executing housekeeper
        6375:20091029:095908 Deleted 0 records from history and trends

        and I set a trigger to monitor my log file also didn't run..beacuse I can't find any log in agent log file about it..

        I am a newbie to zabbix..if there have some special rules in confoguration..pls tell me
        Attached Files

        Comment

        • zabbix_zen
          Senior Member
          • Jul 2009
          • 426

          #5
          "Deleted 0 records from history and trends"

          simply means your Zabbix deploy is young enough to don't have any Item's data to throw away, as configured in your Item's Keep history/trends (in days)

          I'm not understanding what you're trying to accomplish with your Trigger, did you already tested the Linux templates+Triggers that come in a vanilla Zabbix Server+Agent setup?

          Though it has nothing to do with your problem, your Server has the default value for housekeeping and is performing it hourly, you can change in zabbix_server.conf
          'HousekeepingFrequency' to a little bigger value.

          Comment

          • lth0721
            Junior Member
            • Oct 2009
            • 11

            #6
            thanks。。again

            but in the item had set the keep time as the pictures..
            it seams it didn't save the data in db...
            Attached Files

            Comment

            • zabbix_zen
              Senior Member
              • Jul 2009
              • 426

              #7
              If in Monitoring -> Latest Data you aren't receiving Latest value for 'Number of running processes apache' in the Processes List then something's wrong with your zabbix_agentd.

              Check zabbix_agentd.log for errors

              Comment

              • lth0721
                Junior Member
                • Oct 2009
                • 11

                #8
                the item is running and receive rigth data from agentd but the action based on this trigger is not run..,
                for example I set a trigger like {10.0.1.8roc.num[httpd].last(0)}=0
                but when the number change to 0,the action didn't execute...and don't find any log about it..

                Comment

                • zabbix_zen
                  Senior Member
                  • Jul 2009
                  • 426

                  #9
                  Well if that's it so,

                  then it's probably on the 'Send message to user test' part.

                  Does user Test belongs to a Zabbix User Group with Read Permissions to the Host/Host Group you're trying to monitor?

                  Comment

                  • pietux
                    Junior Member
                    • Oct 2009
                    • 4

                    #10
                    I call it as bug

                    This sounds exactly like the bug me and some others have encountered.
                    Zabbix simply does not send any alerts for tripped trigger events.

                    Please see thread: http://www.zabbix.com/forum/showthread.php?t=13769

                    Petri

                    Comment

                    • lth0721
                      Junior Member
                      • Oct 2009
                      • 11

                      #11
                      Originally posted by zabbix_zen
                      Well if that's it so,

                      then it's probably on the 'Send message to user test' part.

                      Does user Test belongs to a Zabbix User Group with Read Permissions to the Host/Host Group you're trying to monitor?
                      thanks you wake me up....
                      that's the problem location..many thanks for your so much help to me..sorry to trouble these days..
                      Last edited by lth0721; 30-10-2009, 04:41.

                      Comment

                      • zabbix_zen
                        Senior Member
                        • Jul 2009
                        • 426

                        #12
                        I don't see enough data anywhere to call it a bug.

                        Comment

                        • bashman
                          Senior Member
                          • Dec 2009
                          • 432

                          #13
                          Hi,

                          I want to run two remote commands, one on a problem and another on recovery.

                          I have tested the first one (Trigger value = "PROBLEM") and it works fine, but I haven't tested the second.

                          Can I use Trigger value = "OK" for the recovery command?.
                          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                          Comment

                          • zabbix_zen
                            Senior Member
                            • Jul 2009
                            • 426

                            #14
                            Affirmative

                            Comment

                            • bashman
                              Senior Member
                              • Dec 2009
                              • 432

                              #15
                              Ok, thanks. I'll test and post my results.
                              978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                              Comment

                              Working...