Ad Widget

Collapse

Using zabbix_sender with flag "-i"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Laksha
    Junior Member
    • Mar 2020
    • 1

    #1

    Using zabbix_sender with flag "-i"

    Hello everyone,,


    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
    reversephonelookup.onl/ curated.onl/nba-reddit/ pcbuilder.onl/pcpartpicker/
    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..
    Last edited by Laksha; 09-03-2020, 23:27.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    The input file specified by the argument of the zabbix_sender command is read from the beginning of the file. There is no function to read and send after the previously sent line.
    I think there is a way to check the file existence and execute the zabbix_sender command using a shell script by cron.

    Comment

    Working...