Ad Widget

Collapse

Asterisk call monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zozo
    Junior Member
    • Nov 2012
    • 6

    #1

    Asterisk call monitoring

    Hello,

    I am setting up an asterisk call monitoring on zabbix 2.0.3. in the zabbix_agentd.conf I have set up the following command:

    Code:
    UserParameter=asterisk.calls,UserParameter=sudo asterisk -rvvvvvx 'core show channels'|grep --text -i 'active call'|awk '{print $1}'
    then I set up an item and the asterisk is running the command I am always getting in the log the following
    Code:
    16422:20121108:062900.426 In substitute_key_macros() data:'asterisk.calls'
     16422:20121108:062900.426 End of substitute_key_macros():SUCCEED data:'asterisk.calls'
     16422:20121108:062900.426 In get_value() key:'asterisk.calls'
     16422:20121108:062900.426 In get_value_agent() host:'Hostname' addr:'XX.XX.XXX.XX' key:'asterisk.calls'
     16422:20121108:062900.428 Sending [asterisk.calls
    Please guide me make this work.
    thanks.
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    do you try this command as zabbix-user?!
    Debian-User

    Sorry for my bad english

    Comment

    • zozo
      Junior Member
      • Nov 2012
      • 6

      #3
      Code:
      zabbix@hostname:/$ sudo asterisk -rvvvvvx 'core show channels'|grep --text -i 'active call'|awk '{print $1}'
      4
      it works correctly.

      Comment

      • zozo
        Junior Member
        • Nov 2012
        • 6

        #4
        Originally posted by Shad0w
        do you try this command as zabbix-user?!
        Code:
        zabbix@hostname:/$ sudo asterisk -rvvvvvx 'core show channels'|grep --text -i 'active call'|awk '{print $1}'
        6
        Apparently works on the zabbix user.

        Comment

        • kazuki
          Junior Member
          • Oct 2012
          • 6

          #5
          did you try if other parameters work?

          try it
          Code:
          UserParameter=asterisk.calls,echo hello >> /var/log/test

          Comment

          • zozo
            Junior Member
            • Nov 2012
            • 6

            #6
            Hi,

            I've changed the script a little bit by replacing the awk with the cut command and it works now.

            Thanks for your help anyone

            Comment

            Working...