Ad Widget

Collapse

Using zabbix_sender with flag "-i"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepaksharma1717
    Junior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2018
    • 7

    #1

    Using zabbix_sender with flag "-i"

    Hello Friends,

    I am looking for setting up Zabbix monitoring for new environment where I will be using "zabbix_sender" utility. There are 2 cases I can use, need your comments. Are they right or is there something else I can do to increase performance.

    Case 1 : Each time a custom script runs on Zabbix agent node it will run "zabbix_sender" as last part of script and send values to Zabbix as

    zabbix_sender [-v] [-z server] [-p port] [-I IP-address] [-s host] [-k key] -o value

    Case 2 : Or I edit my scripts, so that after there execution they will send there output to some "inputfile.txt". And then I use this file in "zabbix_sender" as

    zabbix_sender [-v] [-z server] [-p port] [-I IP-address] [-s host] -i inputfile.txt

    My query from second case is, as per Zabbix at a time max 250 values can be sent in 1 connection. So is every time when "zabbix_sender" will run it will read file from start or from last read position? Since I will be running the "zabbix_sender" as cron job.

    Or is there any other way, by which I can achieve similar process. I want to achieve a way by I can run "zabbix_sender" continuously (maybe as cron job), so that every time it finds new entry under "inputfile.txt" it will push that to Zabbix server.

    Thanks in advance, kindly let me know your comments/suggestions.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    When the zabbix_sender command is executed with the -i option, it is read from the beginning of the file.
    If I use the function of log file monitoring, the last line of the file where the processing result is output is continued and acquired by Zabbix server, and the value is taken out from the line of the log and used as the item value I will.

    Comment

    • deepaksharma1717
      Junior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2018
      • 7

      #3
      Hi Atsushi, thanks for comments but I am looking for something similar functionality of what log file monitoring do for zabbix_sender (reading from last read position). Since I will not be installing zabbix agents on my nodes, but can have zabbix_sender binary as standalone. If you can suggest some similar solution or logic by which I can achieve my goal. Kindly let me know.

      Comment


      • Atsushi
        Atsushi commented
        Editing a comment
        If you can not install the Zabbix agent, you will have to choose the Case 1 method. The zabbix_sender command can not read the file continuously and send it from the continuation.
    Working...