Perform Monitoring of MongoDB Replicaset using ansible

Hello All,

I need to monitor MongoDB replica set using Ansible, I have created below playbook, i need some guidance on the same, if some one has done this before please help.

Hello All,

I need to monitor MongoDB replica set using Ansible

How is this monitoring supposed to happen? I’m asking because ansible is a configuration management tool. Monitoring is usually done with monitoring tools.

I have created below playbook, i need some guidance on the same

What is the problem/error you encounter?

Hello Dick,

Thanks for the response.

We are trying to do monitoring with Splunk but as of now we are sure if we can query to the admin DB and get the output of command rs.status(), in splunk.

That’s why I am thinking of having this playbook as an alternative arrangement.

I have not tested it yet but happy to get feedback on the playbook, if it’s looking allrite

Regards
Amit

I would not use ansible for this purpose at all, so I don’t think it looks “allrite” :slight_smile:
If you have actual errors/issues with running the playbook then we have something tangible.
I wonder why you have not even tested it…?