'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
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
file is not even created if specified in crontab file
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}
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
Comment