Ad Widget

Collapse

how to use Alias in zabbix_agentd.conf ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xuxf
    Junior Member
    • May 2010
    • 4

    #1

    how to use Alias in zabbix_agentd.conf ?

    http://www.zabbix.com/documentation/.../zabbix_agentd

    refering to the doc above,I set an Alias in zabbix_agentd.conf,
    for example,
    Alias=zbxhome:/home/monitor/zabbix

    but how to use it ? Does any body use alias in conf ?
    Please show me an example.
  • xuxf
    Junior Member
    • May 2010
    • 4

    #2
    please tell me how to do if you know it.

    Comment

    • ghoz
      Senior Member
      • May 2011
      • 204

      #3
      read the manual once more.

      the alias mecanism let you create a new key that will alias another one.

      on zabbix server you create an item 'yourkey'
      on the agent config add an Alias=yourkey:realkey

      with realkey one of the numerous things you can monitor on the agent.

      I'm using it on windows agents only,
      • to track ethernet items, that way my graphs/ triggers reference eth0 and eth1 just like under linux, and i dont have to change my items for every ethernet card on windows (you have to use the real name of the card or the IP)
      • to track perf counters on different versions of windows (they have a bad tendency of changing translations between versions)


      I dont know what you were trying to monitor,
      you can use agent internal checks without changing anything in your configuration ,
      and if you want to add custom items, you have to look at userparameters to run scripts on your monitored host.

      good luck, and good reading
      Last edited by ghoz; 08-07-2011, 11:11. Reason: typo

      Comment

      • xuxf
        Junior Member
        • May 2010
        • 4

        #4
        Thank you, ghoz.
        I understand the usage now.

        By the way, Is there a way to configure relative path in zabbix_agentd.conf ?
        For example,
        my config file path is /home/monitor/zabbix/conf/zabbix_agentd.conf, in this zabbix_agentd.conf, I defined
        PidFile=/home/monitor/zabbix/run/zabbix_agentd.pid
        LogFile=/home/monitor/zabbix/log/zabbix_agentd.log
        I find that ,I must put these config item in full path.
        Can I just configure like this : PidFile=$HOME/zabbix/run/zabbix_agentd.pid ?

        And I include a config file in zabbix_agentd.conf,
        "Include=/home/monitor/zabbix/conf/zabbix_agentd.userparams.conf" works, but "Include=zabbix_agentd.userparams.conf" does not work.

        And if I use UserParameters ,
        UserParameter=db2.tablespace[*],db2tablespace.sh "$1" "$2" "$3" "$4"
        db2tablespace.sh must in $PATH,or I should write it in full path,like
        UserParameter=db2.tablespace[*],/home/monitor/zabbix/bin/db2tablespace.sh "$1" "$2" "$3" "$4"
        If I don't want to set /home/monitor/zabbix/bin in PATH, is there a way to solve this better ? for example:
        UserParameter=db2.tablespace[*],$AGENTHOME/bin/db2tablespace.sh "$1" "$2" "$3" "$4"

        I don't know whether I express it clearly,
        thank you very much.

        Comment

        • ghoz
          Senior Member
          • May 2011
          • 204

          #5
          full path for the configs, no shortcut that I know of...

          for user parameters, as you guessed, if not in zabbix agent's $PATH, you have to put the full path...

          Comment

          Working...