Ad Widget

Collapse

Escape "#" character in zabbix_agentd.comf (Windows)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dm0nkz
    Junior Member
    • Jan 2005
    • 9

    #1

    Escape "#" character in zabbix_agentd.comf (Windows)

    Hi,

    Im trying to configure my zabbixW32 agent on a windows 2000 machine.
    The machine has two nics and refers to one of the NIC as

    "BroadCom NetXtreme Gigabit Ethernet Driver#1" .. thus i would add

    PerfCounter=NeTotal,"\Network Interface(BroadCom NetXtreme Gigabit Ethernet Driver#1)\Bytes Total/sec",10

    The thing is im getting error when i do a zabbixw32.exe check-config
    It says Invalid perfomance counter specifications... I tried removing the "#"
    to check if it is causing the problem and it returned "OK"

    It seems that i need to escape the "#" character so that it will not be
    interpreted as a comment.

    Thanks.

    dm0nkz
  • karn
    Junior Member
    • Jul 2005
    • 1

    #2
    I ran into the same problem with the latest release (1.1alpha10). The proper solution is to have some escape character like you mentioned. However, a quick solution is to do something like this:

    On line 215 of zabbix-1.1alpha10/src/zabbix_agent_win32/config.cpp insert this code:
    Code:
       for (int i = 0, n = strlen(buffer); i < n; i++)
          if (buffer[i] == '^') buffer[i] = '#';
    It will replace any '^' character with the '#' after the comments in the config file have already been removed. Then you can change your zabbix_agentd.conf file to:

    PerfCounter=NeTotal,"\Network Interface(BroadCom NetXtreme Gigabit Ethernet Driver^1)\Bytes Total/sec",10

    The config parser will read in the line properly, convert the '^' to a '#' and then pass the correct Network Interface name.

    Hope that helps.

    Comment

    • SparHawk
      Junior Member
      • Oct 2004
      • 19

      #3
      ZabbixW32.exe

      How do you recompile the .exe after adding the code to line 215

      Thanks

      SparHawk

      Comment

      • dm0nkz
        Junior Member
        • Jan 2005
        • 9

        #4
        Or can someone with the compiled (.exe) version share or have it uploaded hear? maybe we can standardize it rather than trouble shooting different
        implementations..

        just a thought..

        God bless!

        dm0nkz

        Comment

        Working...