# Regular Expressions in check\_disk partition list

**URL:** <https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229>\
**Category:** Service Monitoring\
**Tags:** check\_disk\
**Created:** [October 24, 2024, 9:15am UTC](https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229 "2024-10-24T09:15:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mb19](https://community.icinga.com/user_avatar/community.icinga.com/mb19/32/7260_2.png) [@mb19](https://community.icinga.com/u/mb19)\
**Post date:** [October 24, 2024, 9:15am UTC](https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229/1 "2024-10-24T09:15:12Z")

</div>

Hello everyone,

I’m trying to use regular expressions for some of my hosts in Icinga, but even though it doesn’t throw any errors when I write and restart the configuration, it seems to be ignoring them.

 ![image](https://community.icinga.com/uploads/default/original/2X/1/18f72cd1646dc41be310e6d00cb41bd6fe0800d1.png)

Is this feature not implemented, or am I possibly configuring it in the wrong place? Any guidance or insights would be greatly appreciated.

![image](https://community.icinga.com/uploads/default/original/2X/1/1ae81852368a970ec9b0e7c01ce24d245db07dc7.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![apenning](https://community.icinga.com/user_avatar/community.icinga.com/apenning/32/7669_2.png) [@apenning](https://community.icinga.com/u/apenning)\
**Post date:** [October 24, 2024, 9:34am UTC](https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229/2 "2024-10-24T09:34:50Z")

</div>

Thanks for posting. I took the liberty to alter the topic and category as this is regarding a service check and the ITL.

Setting `disk_partitions_excluded` for the disk service check, results in the `-x` parameter being used for the check plugin. According to the monitoring plugins [check\_disk man page](https://www.monitoring-plugins.org/doc/man/check_disk.html), `-x` results in a device being ignored, but it neither mentions globbing nor regex. Thus, the check plugin is unable to do so.

However, if you want to exclude every tmpfs, you should be able to add `tmpfs` to `disk_exclude_type`.

---

<div class="post-metadata">

**Author:** ![bberg](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bberg](https://community.icinga.com/u/bberg)\
**Post date:** [October 24, 2024, 9:56am UTC](https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229/3 "2024-10-24T09:56:10Z")

</div>

To add to what @apenning just told you:  
You can use check\_system\_basics filesystem check: [GitHub - NETWAYS/check\_system\_basics: A Monitoring Plugin to test various basic operating system properties (on Linux for now)](https://github.com/NETWAYS/check_system_basics?tab=readme-ov-file)  
The exclude and include flags all support regular expressions.

---

<div class="post-metadata">

**Author:** ![mb19](https://community.icinga.com/user_avatar/community.icinga.com/mb19/32/7260_2.png) [@mb19](https://community.icinga.com/u/mb19)\
**Post date:** [October 24, 2024, 10:18am UTC](https://community.icinga.com/t/regular-expressions-in-check-disk-partition-list/14229/4 "2024-10-24T10:18:40Z")

</div>

Mmm unfortunately, it is ext4. I think for now I will add the partitions manually, but thank you both for your help!
