Ad Widget

Collapse

how can I change zabbix to run as root power

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • timer705
    Junior Member
    • Jun 2006
    • 1

    #1

    how can I change zabbix to run as root power

    To day, I want to add a option in zabbix_agentd.conf. The option is:UserParameter=b2b.chn,/usr/sbin/asterisk -rx 'show channels' | grep --text -i 'active call' | awk '{print $1}'

    But asterisk must using by root power.

    How can I change zabbix to run as root power?
  • epifanova
    Junior Member
    • May 2006
    • 26

    #2
    you can configure sudo (without password prompt) for zabbix user.
    then change parameter to
    UserParameter=b2b.chn,sudo /usr/sbin/asterisk -rx 'show channels' | grep --text -i 'active call' | awk '{print $1}'

    Comment

    • achu_sab
      Member
      • May 2006
      • 49

      #3
      I tested the user parameter without the sudo . Its working but have problems, like when I run zabbix_agend -p command it shows the value of the user parameter and when I run the command zabbix_get -s 127.0.0.1 b2b.chn command its showing empty results.
      Also its not showing no value in item list.

      I found error in the server.log as
      Got empty string from [server] IP [127.0.0.1] Parameter [b2b.chn]

      Any help will be appreciated

      Comment

      • getUP
        Member
        • Jun 2006
        • 34

        #4
        Experiencing the same issue here.

        Comment

        • achu_sab
          Member
          • May 2006
          • 49

          #5
          For running /usr/sbin/asterisk user zabbix must have permission on it . Otherwise you can set a sudo on this like the following :
          Run the command :
          visudo
          and edit the file like this
          # User privilege specification
          zabbix ALL = NOPASSWD: /usr/sbin/asterisk

          Now login as zabbix and try to run the command /usr/sbin/asterisk -rv . If you connect to the CLI then zabbix can give you the output you want.

          Comment

          Working...