Ad Widget

Collapse

Escape bars in zabbix_get

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fast.ryder
    Member
    • Apr 2008
    • 46

    #1

    Escape bars in zabbix_get

    Hello, everyone!

    I have come across the solution for a problem I have encountered recently.

    Using the portuguese version of Server 2003, I was never able to get performance data in shell mode (bash) using zabbix_get.

    The command I used for zabbix_agent was:

    zabbix_get -s (ip) -k perf_counter[\Sistema\Threads]

    However, I enabled logging level 4 for the Zabbix agent and my system complained about:

    "cannot find SistemaThreads"

    (Something like cannot find SystemThreads, as if the input was badly parsed..)

    then I added two more slashes and everything went ok:

    zabbix_get -s (ip) -k perf_counter[\\Sistema\\Threads]

    So if anyone else has this problem... please try it out.


    P.S.: Zabbix team, is this a bug? I "RTFM" but did not find any reference to double slashes... (1.6 version)

    Thanks,

    Ivo Pereira
    IT Consultant
    Portugal
  • niekie
    Junior Member
    • Apr 2008
    • 16

    #2
    This is not a Zabbix bug, this is your shell on Linux eating your '\'. A '\' in a Linux/Unix shell usually indicates that the very next character should not be interpreted but taken literally. So to have "zabbix_get" actually see a '\' you have to '\' the '\' ("escape the escape character").

    Niek.

    Comment

    Working...