Ad Widget

Collapse

Trigger name or trigger comments with macro's

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rangeshgupta
    Junior Member
    • May 2010
    • 21

    #1

    Trigger name or trigger comments with macro's

    Hi,

    I m monitoring the process with the help of snmp. Below is the OID of the process.

    UCD-SNMP-MIB:: prIndex.1 = INTEGER: 1
    UCD-SNMP-MIB:: prNames.1 = Process name, it can be any process
    UCD-SNMP-MIB:: prErrorFlag.1 = INTEGER: 0
    UCD-SNMP-MIB:: prErrMessage.1 = STRING:


    So i have created a trigger for service down


    Trigger Name:- Process 1
    Expression:- {SNMP_LINUXrErrorFlag.1.last(0)}=1


    If my trigger condition is true, In the GUI it will say Process 1 Status: Problem

    I hv tried to put macros on Trigger name or the comment for getting the process name put its not working

    Any buddy know the work around of it.

    Thanks
    Last edited by rangeshgupta; 26-07-2010, 11:56.
  • rangeshgupta
    Junior Member
    • May 2010
    • 21

    #2
    Let me make my question straight forward:

    1. Can we hv macro's on trigger name or trigger comment.
    2. If YES, then can i hv an example of it.
    3. If NO, Is there any work around of it.

    Thanks

    Comment

    • sarathyme
      Member
      • Mar 2009
      • 58

      #3
      Plz try this,

      Trigger Name:- Process {ITEM.VALUE1} has Error {ITEM.VALUE2}

      Expression:- ({SNMP_LINUXrNames.1.last(0)}) & {SNMP_LINUXrErrorFlag.1.last(0)}=1

      Trigger names can have macros, (which can have values of items in trigger expression.

      here ({SNMP_LINUXrNames.1.last(0)}) is used just to show you the process name.

      (for more info, refer List of supported macros in manual)

      Regards
      Vijay

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        That would be nice.
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • rangeshgupta
          Junior Member
          • May 2010
          • 21

          #5
          Originally posted by sarathyme
          Plz try this,

          Trigger Name:- Process {ITEM.VALUE1} has Error {ITEM.VALUE2}

          Expression:- ({SNMP_LINUX: prNames.1.last(0)}) & {SNMP_LINUX: prErrorFlag.1.last(0)}=1

          Trigger names can have macros, (which can have values of items in trigger expression.

          here ({SNMP_LINUXrNames.1.last(0)}) is used just to show you the process name.

          (for more info, refer List of supported macros in manual)

          Regards
          Vijay


          Thanks vijay for valuable reply

          I hv tried the expression you hv mention. Now i m getting the service name with the trigger name. But the expression status is always UNKNOWN.

          Trigger Name:- Process {ITEM.VALUE1} has Error {ITEM.VALUE2}

          Expression:- ({SNMP_LINUXrNames.1.last(0)}) & {SNMP_LINUXrErrorFlag.1.last(0)}=1


          Then i hv change the expression to :-

          Trigger Name: Process {ITEM.VALUE2} has Error {ITEM.VALUE1}

          Trigger Expression: {SNMP_LINUX: prErrorFlag.1.last(0)}=1|{SNMP_LINUX: prNames.1.last(0)}


          Trigger is working fine when error flag is 1
          but
          when it is 0 the trigger status is UNKNOWN.

          Is there any string function, so that i can the evaluate string expression.

          Thanks

          Comment

          • sarathyme
            Member
            • Mar 2009
            • 58

            #6
            Looks like it is expecting a condition on the second part of the expression.
            Can you plz try this.

            ({SNMP_LINUX: prErrorFlag.1.last(0)}=1) & ({SNMP_LINUX: prNames.1.str(#@!)}=0)

            There are string functions (regexp, str etc). Str checks if the argument we pass is matching the part of the string. We can try checking if the prName does not contain #@! (some junk text). I am not sure there would be a better way, but this should work.

            Regards
            Vijay

            Comment

            • rangeshgupta
              Junior Member
              • May 2010
              • 21

              #7
              Thanks dude it working

              Final Expression

              ({SNMP_LINUX: prErrorFlag.1.last(0)}=1) & ({SNMP_LINUX: prNames.1.str('123455')}=0)


              Thanks

              Comment

              • subba5678
                Senior Member
                • May 2010
                • 132

                #8
                Hi,
                How did you set up the trigger for SYSTEM.CPU.LOAD . Can you please help me in this.

                Thanks,
                Subbu

                Comment

                • bashman
                  Senior Member
                  • Dec 2009
                  • 432

                  #9
                  Originally posted by subba5678
                  Hi,
                  How did you set up the trigger for SYSTEM.CPU.LOAD . Can you please help me in this.

                  Thanks,
                  Subbu
                  For example you can use:

                  Code:
                  {T-Linux-OS:system.cpu.load[,avg1].avg(900)}>5) & ({T-Linux-OS:system.cpu.load[,avg1].avg(900)}<8
                  But I prefer to use:

                  Code:
                  {T-Linux-OS:system.cpu.util[,idle,avg1].avg(900)}<10 | {T-Linux-OS:system.cpu.util[,idle,avg1].avg(900)}=10
                  978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                  Comment

                  • subba5678
                    Senior Member
                    • May 2010
                    • 132

                    #10
                    Hi,
                    Thanks for the reply , how do you create the trigger if the SYSTEM.CPU.Load reaches to 95% for windows Servers.



                    Thanks,
                    Subbu

                    Comment

                    • bashman
                      Senior Member
                      • Dec 2009
                      • 432

                      #11
                      Originally posted by subba5678
                      Hi,
                      Thanks for the reply , how do you create the trigger if the SYSTEM.CPU.Load reaches to 95% for windows Servers.



                      Thanks,
                      Subbu
                      You can use:

                      Code:
                      {T-MS-OS-Windows:perf_counter["\Processor(_Total)\% Processor Time"].avg(300)}>95
                      978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                      Comment

                      • rangeshgupta
                        Junior Member
                        • May 2010
                        • 21

                        #12
                        Originally posted by subba5678
                        Hi,
                        How did you set up the trigger for SYSTEM.CPU.LOAD . Can you please help me in this.

                        Thanks,
                        Subbu
                        We are calculating the CPU load instead of that we are monitoring the load average.

                        Trigger expression:- {SNMP_LINUX:laLoad.1.avg(300)}>10

                        SNMP_LINUX : Template name
                        :laLoad.1 : Item Key (This item collect the load average of last 1 min)
                        avg(600) : Average value for last 10 minutes.

                        Thanks

                        Comment

                        • subba5678
                          Senior Member
                          • May 2010
                          • 132

                          #13
                          Hi,
                          Thanks for the quick reply ,

                          {T-MS-OS-Windowserf_counter["\Processor(_Total)\% Processor Time"].avg(300)}>95

                          It means zabbix will monitor the load average for 5 mins , if load average is more than 95 then it will send a trigger . can you please give me a exact function name which i need to use to create a Trigger . As because iam taking it to the Live Production

                          Thanks,
                          Subbu

                          Comment

                          • bashman
                            Senior Member
                            • Dec 2009
                            • 432

                            #14
                            Originally posted by subba5678
                            {T-MS-OS-Windowserf_counter["\Processor(_Total)\% Processor Time"].avg(300)}>95

                            It means zabbix will monitor the load average for 5 mins , if load average is more than 95 then it will send a trigger .
                            Yes, it means that zabbix will do the load average for the last 5 minutes and if it's greater than 95% trigger will be set to TRUE (value will be PROBLEM) and if you have set an action with an email notification you should get a message.

                            Originally posted by subba5678
                            can you please give me a exact function name which i need to use to create a Trigger . As because iam taking it to the Live Production
                            You can use "High CPU load" as a name for your trigger.
                            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                            Comment

                            • subba5678
                              Senior Member
                              • May 2010
                              • 132

                              #15
                              Hi bashman,
                              Iam very Thankfull to you , if have any doubts i will post a query here .if you don't mine can you please post me your email ID


                              Thanks,
                              Subbu
                              Last edited by subba5678; 16-08-2010, 15:52.

                              Comment

                              Working...