Ad Widget

Collapse

zabbix_sender can't send text data.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mox
    Member
    • Sep 2009
    • 90

    #1

    zabbix_sender can't send text data.

    Zabbix_sender can't send text data (Type of information: text).

    For example, I have active item with 'type of information: text'
    On my server I have text file like this:
    # cat /tmp/ip_access_log
    453624 188.127.249.36
    41768 80.93.53.83
    8346 217.79.15.32
    3793 188.134.41.22
    3440 77.88.43.26
    3353 94.127.146.106
    3249 188.134.41.2
    1976 66.249.66.89
    1477 93.158.148.31
    1459 212.158.169.98
    I can do something like this (for example):
    # zabbix_sender -c /etc/zabbix_agentd.conf -k ip_log -o /tmp/ip_access_log
    But in this case server will get line "/tmp/ip_access_log" instead of file content

    And I can't do this:
    # cat /tmp/ip_access_log | zabbix_sender -c /etc/zabbix_agentd.conf -k ip_log -o-
    because option "-o" doesn't support standard input.

    There is no way to do something for send this data.
    Can you invent something for resolving this defect?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    -i ?

    "The message you have entered is too short. Please lengthen your message to at least 10 characters."
    Zabbix 3.0 Network Monitoring book

    Comment

    • Mox
      Member
      • Sep 2009
      • 90

      #3
      I know about this option, but it useless for me
      -i --input-file <Input file> Load values from input file. Specify - for standard input
      Each line of file contains blanks delimited: <hostname> <key> <value>
      I don't have <hostname>, <key> and <value> in my file. And I want to send all file content as one value

      Comment

      • Mox
        Member
        • Sep 2009
        • 90

        #4
        big thanks to richlv! he show me

        zabbix_sender -c /etc/zabbix_agentd.conf -k ip_log -o "$(cat /tmp/ip_access_log)"
        Sorry for my blunt

        Comment

        Working...