Ad Widget

Collapse

unable to send data to zabbix server using cron

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dragan979
    Member
    • Apr 2018
    • 49

    #1

    unable to send data to zabbix server using cron

    'm following this guide https://github.com/omni-lchen/zabbix.../master/cron.d i'm logged as centos user, even tried replacing root with centos but the same

    manually all works fine-data sent to zabbix

    Code:
    /opt/zabbix/cloudwatch/zabbix-cloudwatch/cron.d/cron.Lambda.sh "lambdaAmiCleanup" "aws_north_virginia" "localhost" "default" "us-east-1" {'host': 'aws_north_virginia', 'value': 1.0, 'key': u'Lambda.Invocations.Sum["default","us-east-1","lambdaAmiCleanup"]', 'clock': 1533286680} {'host': 'aws_north_virginia', 'value': 0.0, 'key': u'Lambda.Errors.Sum["default","us-east-1","lambdaAmiCleanup"]', 'clock': 1533286680} {'host': 'aws_north_virginia', 'value': 334.57, 'key': u'Lambda.Duration.Average["default","us-east-1","lambdaAmiCleanup"]', 'clock': 1533286680} {'host': 'aws_north_virginia', 'value': 0.0, 'key': u'Lambda.Throttles.Sum["default","us-east-1","lambdaAmiCleanup"]', 'clock': 1533286680}
    but when scheduling cron job data are no sent (crontab -e), i tried capturing output to txt file, file is created but it's empty


    Code:
    SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/opt/zabbix/cloudwatch/zabbix-cloudwatch/cron.d */1 * * * * root /opt/zabbix/cloudwatch/zabbix-cloudwatch/cron.d/cron.Lambda.sh "lambda-cllean-unknown-instances" "aws_north_virginia" "localhost" "default" "us-east-1" >/tmp/2.txt
    file is not even created if specified in crontab file
    Last edited by dragan979; 03-08-2018, 11:59.
  • dragan979
    Member
    • Apr 2018
    • 49

    #2
    turned out i had to remove root, after that it started working

    Comment

    Working...