From ea435049b3a3f5057b3a894040df3cf4f3256d9e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 23 Apr 2023 22:33:49 +0200 Subject: Refactored syntax highlighting shortcodes into markdown --- content/blog/OpenBSD/softraid_monitoring.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'content/blog/OpenBSD/softraid_monitoring.md') diff --git a/content/blog/OpenBSD/softraid_monitoring.md b/content/blog/OpenBSD/softraid_monitoring.md index 77adfc3..8df879e 100644 --- a/content/blog/OpenBSD/softraid_monitoring.md +++ b/content/blog/OpenBSD/softraid_monitoring.md @@ -13,32 +13,32 @@ I have reinstalled my nas recently from gentoo to OpenBSD and was amazed once ag ## Softraid monitoring I had a hard time figuring out how to properly monitor the state of the array without relying on parsing the output of `bioctl` but at last here it is in all its elegance : -{{< highlight sh >}} +```sh root@nas:~# sysctl hw.sensors.softraid0 hw.sensors.softraid0.drive0=online (sd4), OK -{{< /highlight >}} +``` I manually failed one drive (with `bioctl -O /dev/sd2a sd4`) then rebuilt it (with `bioctl -R /dev/sd2a sd4)`... then failed two drives in order to have examples of all possible outputs. Here they are if you are interested : -{{< highlight sh >}} +```sh root@nas:~# sysctl hw.sensors.softraid0 hw.sensors.softraid0.drive0=degraded (sd4), WARNING -{{< /highlight >}} +``` -{{< highlight sh >}} +```sh root@nas:~# sysctl hw.sensors.softraid0 hw.sensors.softraid0.drive0=rebuilding (sd4), WARNING -{{< /highlight >}} +``` -{{< highlight sh >}} +```sh root@nas:~# sysctl -a |grep -i softraid hw.sensors.softraid0.drive0=failed (sd4), CRITICAL -{{< /highlight >}} +``` ## Nagios check I am still using nagios on my personal infrastructure, here is the check I wrote if you are interested : -{{< highlight perl >}} +```perl #!/usr/bin/env perl ############################################################################### # \_o< WARNING : This file is being managed by ansible! >o_/ # @@ -71,4 +71,4 @@ if (`uname` eq "OpenBSD\n") { print $output{status}; exit $output{code}; -{{< /highlight >}} +``` -- cgit v1.2.3