Ad Widget

Collapse

Problem with Zabbix Sender

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dpeterson
    Junior Member
    • Apr 2014
    • 26

    #1

    Problem with Zabbix Sender

    I am trying to upgrade to 2.4.4 from 2.0.2. I have a script which runs as a cron on my zabbix server host. This worked fine on 2.0.2. But I have facing issues on 2.4.4

    Here is the script:

    Code:
    #!/bin/bash
    
    ## Named config passed in on the command line.
    config_name=$1
    
    ## read in global shell variables.
    . /home/zabbix/zabbix/conf/zabbix_script_global_variables.cfg
    
    ## Assemble the reference to the sql config file.
    sqlsrv="--defaults-extra-file=${sql_cfg_home_dir}/${config_name}.cfg"
    
    ## call the stored procedure and send output to the zabbix host.
    mopts="$sqlsrv -N"
    /usr/local/mysql/bin/mysql  $mopts << __EOF__ | gawk -v confname=${config_name} '{ print confname "  "$0 ; }'| /usr/bin/zabbix_sender -v -v -z  ${zabbix_host}  -i -
    
    show global status
    where Variable_name not in
       ( "COMPRESSION" , "INNODB_HAVE_ATOMIC_BUILTINS" , "RPL_STATUS" , "SLAVE_RUNNING" , "SSL_SESSION_CACHE_MODE" ,
         "SSL_VERSION" , "SSL_CIPHER" , "SSL_CIPHER_LIST" )
    ;
    
    
    __EOF__
    Output on 2.0.2:
    Code:
    zabbix_sender [7138]: Warning: [line 14] 'Key value' required
    zabbix_sender [7139]: DEBUG: answer [{
            "response":"success",
            "info":"Processed 187 Failed 63 Total 250 Seconds spent 0.001199"}]
    info from server: "Processed 187 Failed 63 Total 250 Seconds spent 0.001199"
    zabbix_sender [7140]: DEBUG: answer [{
            "response":"success",
            "info":"Processed 91 Failed 63 Total 154 Seconds spent 0.000763"}]
    info from server: "Processed 91 Failed 63 Total 154 Seconds spent 0.000763"
    sent: 404; skipped: 1; total: 405
    Output on 2.4.4:
    Code:
    zabbix_sender [5090]: Warning: [line 14] 'Key value' required
    Sending failed.
    I believe the issue lies within the syntax of my zabbix_sender command in the script. Any help would be greatly appreciated!
  • prateek248
    Junior Member
    • Nov 2021
    • 1

    #2
    I'm also facing same issue. dpeterson , did you get any fix?

    Comment

    Working...