Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration issue with RDS #15

Open
Milozavic opened this issue Jul 6, 2017 · 13 comments
Open

configuration issue with RDS #15

Milozavic opened this issue Jul 6, 2017 · 13 comments

Comments

@Milozavic
Copy link

Hi
well i'am stack at the step 5 when configuring zabbix trapper; what do you mean by discovery_item_value?
the in step 6 when i try to add the new host, how can i find connection port (default value:10050)?

Could you please enlighten me on this :)

@omni-lchen
Copy link
Owner

Please import RDS and DynamoDB templates into zabbix, RDS doesn't use discovery rule, but DynamoDB uses discovery rule, which discovers DynamoDB tables by using a condition rule. As the metric uses zabbix trapper, it doesn't require zabbix agent, so the port is not required, the host is a dummy host (127.0.0.1) anyway.

@Milozavic
Copy link
Author

thank you Omni-Ichen for your support, well, my question about port number was because of my AWS/RDS EndPoint is behind a firewall and only TCP/1521 is open...

  • i've made the requested change on awscred and awscred files
  • placed the whole plugin files under "/opt/zabbix/cloudwatch"
  • made the apropriate external scripts include on "/etc/zabbix/zabbix_server.conf"
  • imported the AWS/RDS template on zabbix webportal and added a new RDS host
  • restarted zabbix-server service
    ...
    Still can't see any thing under Monitoring>Latest Data
    i'am running zabbix 3.2 in case you wanna now the version

@Atem18
Copy link
Contributor

Atem18 commented Jul 10, 2017

@Milozavic Did you made a crontab entry for each RDS you want to monitor ?

@Milozavic
Copy link
Author

yes and this, added this:

*/1 * * * * /opt/zabbix/cloudwatch/cron.d/cron.RDS.sh "pjhokan-db" "pjhokan-db.amazonaws.com" "localhost" "myAWSaccount" "myregion" &>/dev/null

@omni-lchen
Copy link
Owner

Please check all parameters are set up correctly, also the aws credentials, I don't recommend to run cron job every minute, it causes high CPU utilisation, you can run every 5 minutes, but collect 1-min data instead by changing the bash wrapper PERIOD="60", also disable this function sendLatestCloudWatchData(zabbix_server, zabbix_host, cw_data), enable the following functions in zabbix-python.py.
log_buffer = 500
cw_log = initCloudWatchLog(aws_service, zabbix_host, aws_region)
sendAllCloudWatchData(zabbix_server, zabbix_host, cw_data, cw_log)
purgeOldCloudWatchLog(cw_log, log_buffer)

@Milozavic
Copy link
Author

i've made the changes as u requested ... and i got this when running the script:
[root@zbx-srv ~]#/opt/zabbix/cloudwatch/cron.d/cron.RDS.sh "db-O7KCISXXXXXX" "phinstance-db.amazonaws.com" "localhost" "xxxx-xxxx-xxxx" "region"
OUTPUT:
Traceback (most recent call last):
File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 370, in
cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions)
File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 154, in getCloudWatchData
aws_account = awsAccount(account)
File "/opt/zabbix/cloudwatch/awsAccount.py", line 20, in init
options = Config.options(account)
File "/usr/lib64/python2.7/ConfigParser.py", line 279, in options
raise NoSectionError(section)
*ConfigParser.NoSectionError: No section: 'xxxx-xxxx-xxxx'

AS if the input account is not valide
support me please :(

@omni-lchen
Copy link
Owner

It looks like your aws account specified in the parameters of cron.RDS.sh doesn't match the one in conf/awscred.conf, please check "[account]" in the conf file.

@Milozavic
Copy link
Author

This is what i have in my awscred.conf
[aws_account_1]
aws_access_key_id=xxxxxx (login)
aws_secret_access_key=xxxxxx (password)
...
i've left this field [aws_account_1] as it is, should i change it with my account id value (xxxx-xxxx-xxxx) ?

@Milozavic
Copy link
Author

forget to montion when accessing the cloudwatch portal i've to input my account id, login and password
and the awscred.conf contain only two field access_key_id(login) and secret_access_key(password)

@omni-lchen
Copy link
Owner

aws_access_key_id and aws_secret_access_key are not your login id and password, you should go to IAM in AWS console to generate your access keys. Use access keys to make secure REST or HTTP Query protocol requests to AWS service APIs.

@Milozavic
Copy link
Author

omni-Ichen thank you soo much for you help and sorry for not giving you feedback in time cuz i've been very busy those days...
well it work finaly but still one final thing... i run the cmd

"/opt/zabbix/cloudwatch/cron.d/cron.RDS.sh "pjhokan-db" "pjhokan-db" "localhost" "aws_account_1" "ap-northeast-1"
and i'm able now to see data on zabbix web-portal but when adding that to contab nothing happen!! dont know way!!!
do you have any idea!!

@omni-lchen
Copy link
Owner

Please check cron service has started up, and you can see the cron job in cron log, /var/log/cron or /var/log/syslog

@Milozavic
Copy link
Author

Oooh thank you Long Chen, thank for your support, it worked already and it was a problem of internet connection, i just run:

export https_proxy="my proxy's IP address"

thank you Long.. really u've done a great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants