Ad Widget

Collapse

Trigger name or trigger comments with macro's

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • subba5678
    Senior Member
    • May 2010
    • 132

    #16
    Hi,
    I want to monitor and create a trigger for the Windows CPU Utilization ,Can you please post me the Parameter for the CPU Utilization {system.cpu.util } using this template for 30 Mins and for the of threshold 95%


    Thanks
    Subbu
    Last edited by subba5678; 17-08-2010, 18:18.

    Comment

    • bashman
      Senior Member
      • Dec 2009
      • 432

      #17
      Originally posted by subba5678
      Hi,
      I want to monitor and create a trigger for the Windows CPU Utilization ,Can you please post me the Parameter for the CPU Utilization {system.cpu.util } using this template for 30 Mins and for the of threshold 95%


      Thanks
      Subbu
      You can use for Windows:

      Code:
      perf_counter[counter,<interval>]
      Value of any performance counter, where “counter” is the counter path, and “interval” is the time period for storing the average value.
      Return is the Average value of the “counter” during last “interval” seconds. Default value, if not given, for “interval” is 1.
      Performance Monitor can be used to obtain list of available counters. Until version 1.6 this parameter will return correct value only for counters that require just one sample (like \System\Threads). It will not work as expected for counters that require more that one sample - like CPU utilisation. Since 1.6 interval is used, so the check returns an average value for last “interval” seconds every time.

      For Linux:

      Code:
      system.cpu.util[<cpu>,<type>,<mode>]
      cpu - CPU number (default is all CPUs)
      type - one of idle, nice, user (default), system, kernel, iowait, interrupt, softirq, steal
      mode - one of avg1 (default),avg5 (average within 5 minutes), avg15

      You can read the online documentation:

      http://www.zabbix.com/documentation/...l/config/items
      978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

      Comment

      • subba5678
        Senior Member
        • May 2010
        • 132

        #18
        Hi ,
        Thanks for the reply ,As per your sugesstion I created an item with Zabbix Active Agent and i am not getting any alert . I am using the below parameter .Please help me out.

        Key

        system.cpu.util[,user,avg1]

        Trigger Expression

        BLR-NOC-06:system.cpu.util[,user,avg1].last(0)}>20


        Thanks,
        Subbu
        Last edited by subba5678; 21-08-2010, 00:12.

        Comment

        • bashman
          Senior Member
          • Dec 2009
          • 432

          #19
          Originally posted by subba5678
          Hi ,
          Thanks for the reply ,As per your sugesstion I created an item with Zabbix Active Agent and i am not getting any alert . I am using the below parameter .Please help me out.
          You need an action with condition Trigger value = "PROBLEM" and your email subject and message configured.

          Originally posted by subba5678
          Key

          system.cpu.util[,user,avg1]

          Trigger Expression

          BLR-NOC-06:system.cpu.util[,user,avg1].last(0)}>20


          Thanks,
          Subbu
          The item key and trigger expression is correct. This will be triggered when cpu (user time) is over 20%.
          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

          Comment

          • subba5678
            Senior Member
            • May 2010
            • 132

            #20
            Hi,
            I created a Group Called As " DFW " in that group i added the host. I am getting all the alerts from this Group (Disk , Host Status ,Memory e.tc.) but I am not getting the alerts only related System Cpu Utilization by using the below Paramaeter . If i am wrong with this please help me out ..


            Thanks,
            Subbu

            Comment

            • bashman
              Senior Member
              • Dec 2009
              • 432

              #21
              Originally posted by subba5678
              Hi,
              I created a Group Called As " DFW " in that group i added the host. I am getting all the alerts from this Group (Disk , Host Status ,Memory e.tc.) but I am not getting the alerts only related System Cpu Utilization by using the below Paramaeter . If i am wrong with this please help me out ..


              Thanks,
              Subbu
              Every thing seems fine, may be it's not triggering because user time cpu is not reaching 20%
              978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

              Comment

              • subba5678
                Senior Member
                • May 2010
                • 132

                #22
                Hi ,
                If I want want to test the Parameter Can you please tell me how i can test it as cz after testing the parameter we are taking to like production



                Thanks,
                Subbu

                Comment

                • bashman
                  Senior Member
                  • Dec 2009
                  • 432

                  #23
                  Go to Monitoring > Triggers, select Host Group and Host and look out for your trigger, if you can see your trigger, it means it has triggered, but message wasn't received. Otherwise if you can't see it, you're not getting message because it didn't trigger.
                  978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                  Comment

                  • subba5678
                    Senior Member
                    • May 2010
                    • 132

                    #24
                    Hi,
                    Thanks for the quick reply , I didn't see any trigger in the below specified Path , and more over i logged into the system as User (test) , I am trying to check with the same parameter by giving low threshold (1) . i guess this can help me out.

                    BLR-NOC-06:system.cpu.util[,user,avg1].last(0)}>1


                    Thanks,
                    Subbu

                    Comment

                    • subba5678
                      Senior Member
                      • May 2010
                      • 132

                      #25
                      Hi ,
                      Still i didn't get any trigger as my CPU Utilization is more that 1 . For reference please find the attachment of the screen Shot , Please help me out

                      Thanks,
                      Subbu
                      Attached Files

                      Comment

                      • bashman
                        Senior Member
                        • Dec 2009
                        • 432

                        #26
                        For Windows Servers try this item key:

                        Code:
                        perf_counter["\Processor(_Total)\% Processor Time"]
                        And this trigger expression:

                        Code:
                        BLR-NOC-06:perf_counter["\Processor(_Total)\% Processor Time"].last(0)}>1
                        This would trigger when cpu reaches more than 1%.
                        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                        Comment

                        • subba5678
                          Senior Member
                          • May 2010
                          • 132

                          #27
                          Hi,
                          Its Awsome , It really helped me a lot now i am getting the Triggers if the CPU Usage goes more than 1 . i want to trigger the same if the CPU Usage goes more than 95% for 5 minutes for that Can I use this Paramater , If not please help me out . Also please find the attchment of the Alert which I got For CPU Usage 1%

                          {BLR-NOC-06erf_counter["\Processor(_Total)\% Processor Time"].avg(300)}>90--------------PARAMETER For 5 Mins

                          Alert for CPU Utilization Greater than 1

                          Windows Server - on BLR-NOC-06 - Windows System Information on BLR-NOC-06: PROBLEM

                          Status: PROBLEM
                          Host: BLR-NOC-06 (172.25.100.183)
                          Severity: High
                          Last Item Value:
                          23 %




                          Thanks,
                          Subbu

                          Comment

                          • bashman
                            Senior Member
                            • Dec 2009
                            • 432

                            #28
                            Originally posted by subba5678
                            Hi,
                            Its Awsome , It really helped me a lot now i am getting the Triggers if the CPU Usage goes more than 1 . i want to trigger the same if the CPU Usage goes more than 95% for 5 minutes for that Can I use this Paramater , If not please help me out . Also please find the attchment of the Alert which I got For CPU Usage 1%
                            Great news!, and yes you can use this:

                            Originally posted by subba5678
                            {BLR-NOC-06erf_counter["\Processor(_Total)\% Processor Time"].avg(300)}>90--------------PARAMETER For 5 Mins
                            Or:

                            Code:
                            {BLR-NOC-06:perf_counter["\Processor(_Total)\% Processor Time"].min(300)}>95
                            Which is your polling interval?, if you have a 60 seconds interval, you can use also for 5 minutes:

                            Code:
                            {BLR-NOC-06:perf_counter["\Processor(_Total)\% Processor Time"].avg(#5)}>90
                            Your message is great:

                            Originally posted by subba5678
                            Alert for CPU Utilization Greater than 1

                            Windows Server - on BLR-NOC-06 - Windows System Information on BLR-NOC-06: PROBLEM

                            Status: PROBLEM
                            Host: BLR-NOC-06 (172.25.100.183)
                            Severity: High
                            Last Item Value:
                            23 %




                            Thanks,
                            Subbu
                            Here is another example:

                            Subject:
                            Code:
                            {HOSTNAME}: {TRIGGER.SEVERITY} {STATUS}
                            message:
                            Code:
                            PROBLEM: {TRIGGER.NAME}
                            
                            STATE: {STATUS}
                            
                            MONITOR: {ITEM.NAME}
                            
                            HOST: {HOSTNAME} ({IPADDRESS})
                            
                            SEVERITY: {TRIGGER.SEVERITY}
                            
                            LAST VALUE: {ITEM.LASTVALUE}
                            
                            INITIAL PROBLEM TIME: {EVENT.DATE} - {EVENT.TIME}
                            
                            COMMENTS: 
                            {TRIGGER.COMMENT}
                            
                            NOTIFICATION HISTORY:
                            {ESC.HISTORY}
                            
                            EXTRA INFO:
                            MAX 1': {{HOSTNAME}:{TRIGGER.KEY}.max(60)}. MIN 1': {{HOSTNAME}:{TRIGGER.KEY}.min(60)}.
                            MAX 5': {{HOSTNAME}:{TRIGGER.KEY}.max(300)}. MIN 5': {{HOSTNAME}:{TRIGGER.KEY}.min(300)}.
                            MAX 15': {{HOSTNAME}:{TRIGGER.KEY}.max(900)}. MIN 15': {{HOSTNAME}:{TRIGGER.KEY}.min(900)}.
                            Average value 15': {{HOSTNAME}:{TRIGGER.KEY}.avg(900)}.
                            
                            EVENTO ID: {EVENT.ID}. TRIGGER ID: {TRIGGER.ID}
                            GROUP LINUX ALERTS. LINK: http://XXX.XX.XX.XXX/zabbix/
                            978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                            Comment

                            • subba5678
                              Senior Member
                              • May 2010
                              • 132

                              #29
                              Hi bashman ,
                              I Cant Express my happiness with the Words I feel Great with your Wonderful Help Which helped me to monitor the Windows Servers and Also i will use the Same Template for Linux Servers . As of now i will monitor the basic Stuff and will start monitoring the mysql query , if i am not able to do that i will get back to you .

                              My HeartFull Thanks to you

                              Thanks and Regards,
                              Subbu

                              Comment

                              • bashman
                                Senior Member
                                • Dec 2009
                                • 432

                                #30
                                Originally posted by subba5678
                                Hi bashman ,
                                I Cant Express my happiness with the Words I feel Great with your Wonderful Help Which helped me to monitor the Windows Servers and Also i will use the Same Template for Linux Servers . As of now i will monitor the basic Stuff and will start monitoring the mysql query , if i am not able to do that i will get back to you .

                                My HeartFull Thanks to you

                                Thanks and Regards,
                                Subbu
                                Remember to use something like this:

                                Code:
                                {T-Linux-OS:system.cpu.util[,idle,avg1].avg(900)}<10
                                for the Linux Servers. If you want a Linux or Windows template I can attach you my templates in XML format, but they are in Spanish.

                                For MySQL Server you can use the UserParameters agent items:

                                Code:
                                #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
                                #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
                                #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
                                #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
                                #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
                                #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
                                #UserParameter=mysql.version,mysql -V
                                And:

                                Code:
                                UserParameter=mysql.users,us=$(mysqladmin proc stat -u zabbix|wc -l);let us=$us-5;echo $us
                                UserParameter=mysql.slowquery,mysqldumpslow /var/log/mysql/mysql-slow.log
                                UserParameter=mysql.general,mysqladmin proc stat -u zabbix
                                UserParameter=mysql.aborted_connects,typeset -i ca=$(mysql -u zabbix --execute="SHOW STATUS LIKE 'Aborted_connects'" --skip-column-names|awk '{print $2}'); echo $ca
                                UserParameter=mysql.threads_connected,typeset -i tc=$(mysql -u zabbix --execute="SHOW STATUS LIKE 'Threads_connected'" --skip-column-names|awk '{print $2}'); echo $tc
                                Template example:
                                Code:
                                Description          Type          Key                   Type of information Units      Update interval Store value  History    Trends      Applications
                                Mysql/Ping.          ZABBIX agent  mysql.ping            Numeric (integer)              300             As Is        7          365         Mysql
                                Mysql/Uptime.        ZABBIX agent  mysql.uptime          Character                      7200            As Is        7          365         Mysql
                                Mysql/Threads.       ZABBIX agent  mysql.threads         Numeric (integer)              600             As Is        7          365         Mysql
                                Mysql/Questions.     ZABBIX agent  mysql.questions       Numeric (integer)              600             As Is        7          365         Mysql
                                Mysql/Slowqueries.   ZABBIX agent  mysql.slowqueries     Numeric (integer)              7200            As Is        7          365         Mysql
                                Mysql/Qps.           ZABBIX agent  mysql.qps             Numeric (integer)              600             As Is        7          365         Mysql
                                Mysql/Version.       ZABBIX agent  mysql.version         Character                      7200            As Is        7          365         Mysql
                                Mysql/Users.         ZABBIX agent  mysql.users           Numeric (integer)              600             As Is        7          365         Mysql
                                Mysql/General.       ZABBIX agent  mysql.general         Text                           900             As Is        7          365         Mysql
                                Mysql/Slowquery.     ZABBIX agent  mysql.slowquery       Text                           7200            As Is        7          365         Mysql
                                Feel free you ask.
                                978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                                Comment

                                Working...