We are using Zabbix to monitor our systems.
My question is: Is it possible to monitor the existence of a RAM disk that has already been configured using SoftPerfect RAM Disk?
I am aware that Zabbix can monitor disk usage, free space, and other metrics, but I would like to be notified immediately if the RAM disk becomes inaccessible or fails (e.g., due to unmounting, driver issues, or system instability). Essentially, I want to detect the absence or failure of the RAM disk itself, not just its usage.
Is there a way to check whether the RAM disk (e.g., mounted as R:) is still present and accessible, and if not to trigger an alert if it disappears?
Many thanks
br
Franz
All Forums
> RAM Disk
> Current topic
Monitoring of RAM disk state
Started by Franz
|
Franz
Monitoring of RAM disk state 10 September 2025, 09:03 |
|
|
Re: Monitoring of RAM disk state 10 September 2025, 09:25 |
Admin Registered: 12 years ago Posts: 1 072 |
Yes, you can monitor whether your SoftPerfect RAM Disk is still present and accessible with Zabbix. Here is what you need to do:
Alternatively, you can use a custom check.
If you want something more explicit, you can add a custom user parameter in the Zabbix agent configuration file zabbix_agentd.conf:
In summary, you just need to add a Zabbix item that checks the RAM disk drive letter. If it disappears, Zabbix will either mark the item as unsupported or return 0, and your trigger will notify you immediately.
- Use Zabbix's built-in check.
In Zabbix, add a new item to the host where the RAM disk runs. For Windows you can use this key and replace R: with the actual drive letter of your RAM disk:
vfs.fs.size[R:,free]
If the RAM disk disappears, Zabbix will report this item as unsupported. - Create a trigger on that item to alert if the disk disappears:
{yourhost:vfs.fs.size[R:,free].nodata(60)}=1This means: if the check stops returning data (because the disk is gone) for 60 seconds, raise an alert.
Alternatively, you can use a custom check.
If you want something more explicit, you can add a custom user parameter in the Zabbix agent configuration file zabbix_agentd.conf:
UserParameter=ramdisk.exists,powershell -Command "if (Test-Path R:) {Write-Output 1} else {Write-Output 0}"
After adding this line, restart the Zabbix agent service. Then in Zabbix, add a new item with the key ramdisk.exists, and create a trigger like:
{yourhost:ramdisk.exists.last()}=0
This will alert you if the drive is missing.
In summary, you just need to add a Zabbix item that checks the RAM disk drive letter. If it disappears, Zabbix will either mark the item as unsupported or return 0, and your trigger will notify you immediately.
|
Franz
Re: Monitoring of RAM disk state 10 September 2025, 09:56 |
|
|
Re: Monitoring of RAM disk state 11 September 2025, 09:45 |
Admin Registered: 12 years ago Posts: 1 072 |
Yes, you can achieve something similar with Prometheus and the Node Exporter and detect the disappearance of a RAM disk by using the metrics like:
Please note that the Windows exporter relies on WMI, which by default does not detect "direct I/O" drives - the default mode used when creating a RAM disk. To make the RAM disk visible to the exporter, enable Hard Disk Emulation in the RAM disk properties and remount it. Once it is emulated as an HDD, the metrics above will become available for monitoring.
Alternatively, for a more explicit signal, you could use the exporter's textfile collector. A small scheduled PowerShell script "Test-Path R:\" could check if "R:\" exists and write a metric like "ramdisk_exists 1" (or 0 if missing) into a .prom file. Prometheus would then pick this up, and you could alert directly if "ramdisk_exists == 0" or if the metric is absent.
windows_logical_disk_size_bytes{volume="R:"}
windows_logical_disk_free_bytes{volume="R:"}
windows_logical_disk_info{volume="R:"}
If the RAM disk disappears, the time series for that drive letter will vanish. You can then set up an alert in Prometheus that fires when the exporter is up, but that particular metric is missing for a certain amount of time.
Please note that the Windows exporter relies on WMI, which by default does not detect "direct I/O" drives - the default mode used when creating a RAM disk. To make the RAM disk visible to the exporter, enable Hard Disk Emulation in the RAM disk properties and remount it. Once it is emulated as an HDD, the metrics above will become available for monitoring.
Alternatively, for a more explicit signal, you could use the exporter's textfile collector. A small scheduled PowerShell script "Test-Path R:\" could check if "R:\" exists and write a metric like "ramdisk_exists 1" (or 0 if missing) into a .prom file. Prometheus would then pick this up, and you could alert directly if "ramdisk_exists == 0" or if the metric is absent.