-
assigned issue to
Add support for AWS Cloudwatch
We used JMole in Wildfly with Munin at our previous hosting partner but now we moved to AWS and is missing monitoring.
We don't want to maintain a private Munin installation but want to use Cloudwatch.
Cloudwatch does not support JMX out-of-the-box so we would love see JMole implement Cloudwatch's API.
Comments (12)
-
repo owner -
repo owner Seems easy to implement: http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-cloudwatch.html
If I implement it in a separate branch for the next release(1.3.2), can you assist testing it?
-
reporter Yes I would love to help testing it. I am not that knowable about cloudwatch yet but I have the jmole setup that worked before so first test would be to see that the same metrics' show up in cloudwatch..
-
repo owner Check the branch "feature/59"! For now only metrics are collected.
- git checkout feature/59
- mvn clean install
The following new System properties may be of interest:
- jmole.protocol.cloudwatch.enabled=true
- jmole.protocol.cloudwatch.interval=60000 // The interval to send measurements
- jmole.protocol.cloudwatch.namespace=JMole // The AWS CloudWatch namespace to use
- aws.accessKeyId=<SEE AWS DOCS>
- aws.secretKey=<SEE AWS DOCS>
Please test and see if it works. Next step would be to implement the alarms as well.
(Remember that it may cost extra to use much CloudWatch measurements)
Regards Anders W
-
reporter It works!
Very nice indeed.
Thank you!
-
reporter I've discovered an issue:
I left the jmole.protocol.cloudwatch.namespace as JMole and I see metrics being drawn BUT I run 5 wildflies in docker on ECS and all update the same namespace and therefore the same metrics'.
Of course I need to change jmole.protocol.cloudwatch.namespace to something instance specific but using the docker instance-id or ECS task-id would create a new namespace each time they are restarted.
Apparently Cloudwatch keeps old unused metrics for 15 months now: https://stackoverflow.com/questions/23229268/how-do-you-delete-an-aws-cloudwatch-metric
This would make lead to thousands of namespaces..
Any idea on how to merge the data into one namespace or even how to collate the data from different wildflies into on metrics?
-
repo owner This is more of a AWS question and have little to do with JMole ;-)
Perhaps you can use AWS Tags to solve it. I'll see if I get the time to look into it while I continue implementing support for alarms in the branch. Note that when I think it's ok I'll merge it into the development branch.
-
repo owner Initial support for cloudwatch alarms implemented in branch.
-
repo owner Have you tested the support for alarms? I'm planning of merging this issue into the development branch to be part of the next release.
-
reporter I haven"t tested the alarms yet. Been busy with other things and figuring out how to solve my aws issue.
I'll try if I can test it tomorrow.
-
reporter - changed status to resolved
Alarms is working too.
-
reporter When do you plan to release the next release (which this can part of)?
- Log in to comment