Ansible playbook to monitor disk space utilization and generate alert

231 views
Skip to first unread message

Amit Das

unread,
Jul 18, 2022, 2:18:43 PM7/18/22
to ansible...@googlegroups.com
Dear All,

I am relatively new to Ansible. Could someone please guide me on writing a playbook which runs hourly to monitor the disk space and generates an email alert if the threshold is breached?

Thank you!

Kind regards,
Amit

Dick Visser

unread,
Jul 18, 2022, 4:01:09 PM7/18/22
to ansible...@googlegroups.com
On Mon, 18 Jul 2022 at 20:18, Amit Das <amit....@gmail.com> wrote:
>
> Dear All,
>
> I am relatively new to Ansible. Could someone please guide me on writing a playbook which runs hourly to monitor the disk space and generates an email alert if the threshold is breached?

Ansible is a configuration management tool. You should not waste
effort trying to shoehorn ansible into some home grown service
monitoring tool.
Instead, use a dedicated service monitoring tool for that job.
Picking the right one is outside the scope of this list, but there is
plenty of information out there, take a look at zabbix, nagios, etc.

Antony Stone

unread,
Jul 18, 2022, 4:02:22 PM7/18/22
to ansible...@googlegroups.com
On Monday 18 July 2022 at 20:18:15, Amit Das wrote:

> Dear All,
>
> I am relatively new to Ansible. Could someone please guide me on writing a
> playbook which runs hourly to monitor the disk space and generates an email
> alert if the threshold is breached?

Why are you trying to use ansible for this?

I would recommend https://icinga.com or possibly https://grafana.com for such
a requirement.


Antony

--
Salad is what food eats.

Please reply to the list;
please *don't* CC me.

Amit Das

unread,
Jul 18, 2022, 4:24:49 PM7/18/22
to ansible...@googlegroups.com
Thank you for your suggestion. We already have Dynatrace at work.
For my learning purposes, I wanted to write a playbook. 

Kind regards,
Amit

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLa1PDhep9dOqhjK7GdnV8y%3DzGOYRM26e7LsuQhqCxkf8A%40mail.gmail.com.

John Petro

unread,
Jul 18, 2022, 4:39:53 PM7/18/22
to ansible...@googlegroups.com
If you are looking to learn, one of the first things I learned to do, was I wrote a playbook, that would set up everything I needed when I would load an OS on one of my Raspberry Pi devices. 

--John

Reply all
Reply to author
Forward
0 new messages