Ad Widget

Collapse

Discussion thread for official Zabbix Template Asterisk

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexL
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Aug 2019
    • 55

    #1

    Discussion thread for official Zabbix Template Asterisk

    This thread is designed to provide grounds for discussion of the official Zabbix Template for Asterisk.
    The template and details of the template is available in GIT repository. https://git.zabbix.com/projects/ZBX/.../asterisk_http


    Zabbix is always looking for ways to improve our services and to make our users happier.
    We pride ourselves on doing our best each and every day, but we know that there is always something more to learn.
    We would like to hear back from you to know what have you liked and what would you improve in the template.
    Last edited by AlexL; 10-12-2020, 13:36.
  • c4.gabriel
    Junior Member
    • Oct 2020
    • 1

    #2
    Hello AlexL, great to know someone is working on this Template, super useful ; unfortunately i haven't make it work yet :/

    I'm not sure what I am missing, to be honest I am super new with Zabbix so probably im doing something wrong, so let me tell you what I did.

    1) Enable web manager
    /etc/asterisk/manager.conf

    Code:
    webenabled = yes
    
    [zabbix]
    secret = SuperSecretPasswordNotMyActualPassword
    read = system,call,log,verbose,command,agent,user,origina te
    write = system,call,log,verbose,command,agent,user,origina te
    2) Reload Asterisk Manager

    Code:
    asterisk -rx "manager reload"
    3) I have validated that i have web access to the manager. With My browser i enter the following URL

    Code:
    http://my_local_ip:8088/rawman?action=login&username=zabbix&secret=SuperSecretPasswordNotMyActualPassword
    
    Response: Success
    Message: Authentication accepte
    4) On my Zabbix Server i imported the Template (XML)

    5) I assigned the Template to my server and set the following

    Code:
    {$AMI.SECRET}   SuperSecretPasswordNotMyActualPassword
    {$AMI.URL}  http://my_local_ip:8088/rawman
    {$AMI.USERNAME} zabbix
    {$AMI.PORT} 8088
    I am using a Zabbix Proxy not sure if that is useful info.

    Any ideas on how can I debug why i am not getting any info ?

    Zabbix Server 5.0.3
    Zabbix Client 5.0.4

    Comment

    • max.ch.88
      Senior Member
      • Oct 2018
      • 206

      #3
      Originally posted by c4.gabriel
      Any ideas on how can I debug why i am not getting any info ?

      Zabbix Server 5.0.3
      Zabbix Client 5.0.4
      Hello
      What error are you getting? The template uses an HTTP agent to receive data from Asterisk. HTTP request to Asterisk is executed from the Zabbix server or proxy. Perhaps you didn't open TCP port 8088.

      Comment

      • bconduta
        Junior Member
        • Oct 2020
        • 1

        #4
        Hello!

        It didn't work for me either.

        In macros:
        {$AMI.URL} -://<host>:<port>/<prefix>/rawman (Does not connect)
        {$AMI.URL} -://<host>:<port>/<prefix>/manager (Connects but does not work all items/triggers)

        Comment

        • Turbid
          Junior Member
          • Nov 2011
          • 9

          #5
          1. Does not work while modules chan_sip, chan_iax2 or app_queue.so are unloaded:

          Code:
          12661:20201028:134603.129 error reason for "pbx:asterisk.get_stats" changed: Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk..Date: Wed, 28 Oct 2020 10:46:02 GMT..Cache-Control: no-cache, ...
          1. Failed: Request failed with message Error: Invalid/unknown command: QueueSummary. Use Action: ListCommands to show available commands.. Check debug log for more information.
          12660:20201028:134703.649 item "pbx:asterisk.get_stats" became supported
          Although only pjsip is used on my system.

          p.s. chan_sip is now depricated: https://www.asterisk.org/deprecating...0-rc2-release/

          2. Only unavailable endpoints in PJSIP peers graph. Why not online?

          Comment

          • Damian93
            Junior Member
            • Nov 2020
            • 1

            #6
            I have zabbix version 5.2, according to the documentation there may be problems with .yaml.
            Someone can share the template in a different format?

            Comment

            • bot123
              Junior Member
              • Apr 2016
              • 2

              #7
              Originally posted by Damian93
              I have zabbix version 5.2, according to the documentation there may be problems with .yaml.
              Someone can share the template in a different format?
              In the attachment XML.

              After updating the template on October 29th, I get an error:
              Code:
              Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/16.11.1..Date: Sun, 08 Nov 2020 09:11:15 GMT..Cache-Control: no...
              1. Failed: ReferenceError: identifier 'HttpRequest' undefined
              at [anon] (duktape.c:81729) internal
              at [anon] (function:6) preventsyield
              Attached Files

              Comment

              • Fatym
                Junior Member
                • Aug 2014
                • 25

                #8
                Originally posted by bot123
                In the attachment XML.

                After updating the template on October 29th, I get an error:
                Code:
                Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/16.11.1..Date: Sun, 08 Nov 2020 09:11:15 GMT..Cache-Control: no...
                1. Failed: ReferenceError: identifier 'HttpRequest' undefined
                at [anon] (duktape.c:81729) internal
                at [anon] (function:6) preventsyield
                and I have the same error
                Code:
                Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/13.29.2..Date: Thu, 12 Nov 2020 09:27:01 GMT..Cache-Control: no...
                1. Failed: ReferenceError: identifier 'HttpRequest' undefined
                at [anon] (duktape.c:81729) internal
                at [anon] (function:6) preventsyield
                sometimes this error
                Code:
                Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/13.29.2..Date: Thu, 12 Nov 2020 12:49:01 GMT..Cache-Control: no...
                1. Failed: Request failed with message Follows. Check debug log for more information.
                Last edited by Fatym; 12-11-2020, 14:51.

                Comment

                • max.ch.88
                  Senior Member
                  • Oct 2018
                  • 206

                  #9
                  Originally posted by Damian93
                  I have zabbix version 5.2, according to the documentation there may be problems with .yaml.
                  Someone can share the template in a different format?
                  Hi. No problem with .yaml.
                  Last edited by max.ch.88; 12-11-2020, 20:47.

                  Comment

                  • max.ch.88
                    Senior Member
                    • Oct 2018
                    • 206

                    #10
                    Originally posted by Turbid
                    2. Only unavailable endpoints in PJSIP peers graph. Why not online?
                    Hi. How to get the counter of online PJSIP peers?

                    Comment

                    • benjicx
                      Junior Member
                      • Nov 2020
                      • 4

                      #11
                      Looks like a promising template, but I can't get it working. Access to Manager interface is via HTTPS on port 8089, and curl-ing the URL directly from the shell on zabbix interface works:
                      Code:
                      curl "https://<hostname_of_zabbix>:8089/rawman?action=login&username=zabbix&secret=somesecrethere"
                      
                      Response: Success
                      Message: Authentication accepted
                      However, the JS script for the Zabbix raw item returns the following error:
                      Code:
                      [LIST][*]ReferenceError: identifier 'HttpRequest' undefined[*]at [anon] (duktape.c:81727) internal[*]at [anon] (function:6) preventsyield[/LIST]
                      The secret and URL to access has been set correctly on the Macro on the host.

                      Any thoughts?

                      Ben

                      Comment

                      • Nosferato
                        Junior Member
                        • Nov 2020
                        • 6

                        #12
                        • ReferenceError: identifier 'HttpRequest' undefined
                        • at [anon] (duktape.c:81727) internal
                        • at [anon] (function:6) preventsyield

                        Freebsd 12.1, Zabbix 5.2.1, Current Asterisk Version: 13.23.1, Template https://git.zabbix.com/projects/ZBX/.../asterisk_http (Master)
                        Last edited by Nosferato; 17-11-2020, 11:00.

                        Comment

                        • max.ch.88
                          Senior Member
                          • Oct 2018
                          • 206

                          #13
                          Originally posted by benjicx
                          However, the JS script for the Zabbix raw item returns the following error:
                          Code:
                          [LIST][*]ReferenceError: identifier 'HttpRequest' undefined[*]at [anon] (duktape.c:81727) internal[*]at [anon] (function:6) preventsyield[/LIST]
                          The secret and URL to access has been set correctly on the Macro on the host.
                          Hello. Which Zabbix version are you using?
                          Where did you get this template?
                          Last edited by max.ch.88; 17-11-2020, 10:02.

                          Comment

                          • benjicx
                            Junior Member
                            • Nov 2020
                            • 4

                            #14
                            Originally posted by max.ch.88

                            Hello. Which Zabbix version are you using?
                            Where did you get this template?
                            Morning,

                            Zabbix 5.2.1 and from https://www.zabbix.com/integrations/asterisk which led me to https://git.zabbix.com/projects/ZBX/.../asterisk_http

                            It was the feedback section at the bottom of that page that led me to this forum post.

                            Comment

                            • Turbid
                              Junior Member
                              • Nov 2011
                              • 9

                              #15
                              Originally posted by max.ch.88

                              Hi. How to get the counter of online PJSIP peers?
                              all endpoints - offline = online?

                              Comment

                              Working...