<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ZFS FileSystem]]></title><description><![CDATA[<p dir="auto">Can I watch the ZFS filesystem like<br />
# zpool ststus<br />
I want to get the status, ih the ZFS FileSytsem is degarded or online or in a healthy way<br />
Thank you very much<br />
Rainer</p>
]]></description><link>https://forum.netxms.org/topic/8085/zfs-filesystem</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:55:29 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8085.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Jan 2025 09:16:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ZFS FileSystem on Mon, 13 Jan 2025 06:27:19 GMT]]></title><description><![CDATA[<p dir="auto">Here is the final solution to Watch Linux ZFS Filesystem in Proxmox Server<br />
It can be used for ZFS mirror and raid systems</p>
<p dir="auto">Configuration of agent´s config file (/etc/nxagentd.conf):<br />
add these lines<br />
ExternalList=zpoolNAME:zpool list | tail -n +2 | cut -d' ' -f1<br />
ExternalMetric=zpoolStateSTORE(*):zpool status $1 | grep -E "state" | tr -s " " | cut -d" " -f 3<br />
ExternalMetric=zpoolStateRAID(*):zpool status $1 | grep -E "raid|mirror" | tr -s " " | cut -d" " -f 3</p>
<p dir="auto">Here is the configuration of ZFS RAID status:</p>
<p dir="auto">Metric<br />
zpoolStateRAID({instance})</p>
<p dir="auto">Display name<br />
ZFS: RAID Status of Pool {instance}</p>
<p dir="auto">no Transformation</p>
<p dir="auto">Instance discovery methode<br />
Agent List</p>
<p dir="auto">List name<br />
zpoolNAME</p>
<p dir="auto">Threshold:<br />
Last polled value not like ONLINE</p>
<p dir="auto">Here is the configuration of ZFS STORE status:</p>
<p dir="auto">Metric<br />
zpoolStateSTORE({instance})</p>
<p dir="auto">Display name<br />
ZFS: STORE Status of Pool {instance}</p>
<p dir="auto">no Transformation</p>
<p dir="auto">Instance discovery methode<br />
Agent List</p>
<p dir="auto">List name<br />
zpoolNAME</p>
<p dir="auto">Threshold:<br />
Last polled value not like ONLINE</p>
<p dir="auto">Output:<br />
ZFS: RAID Status of Pool datastore01 = ONLINE<br />
ZFS: RAID Status of Pool rpool = ONLINE<br />
ZFS: STORE Status of Pool datastore01 = ONLINE<br />
ZFS: STORE Status of Pool rpool = ONLINE</p>
<p dir="auto">In my case datastore01 is a raid2-0 system and rpool a mirror-0 system</p>
<p dir="auto">This works fine for me<br />
Thank you for helping<br />
Rainer</p>
]]></description><link>https://forum.netxms.org/post/34082</link><guid isPermaLink="true">https://forum.netxms.org/post/34082</guid><dc:creator><![CDATA[rainerh]]></dc:creator><pubDate>Mon, 13 Jan 2025 06:27:19 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Fri, 10 Jan 2025 15:40:54 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
The following in /etc/nxagentd.conf will work fine:</p>
<p dir="auto">ExternalMetric=zpoolCOUNTER:zpool list | tail -n +2 | wc -l<br />
ExternalMetric=zpoolNAME(*):zpool list | tail -n +2 | sed -n "$1p" | cut -d' ' -f1<br />
ExternalMetric=zpoolStateSTORE(*):zpool status $1 | grep -E "state" | tr -s " " | cut -d" " -f 3<br />
ExternalMetric=zpoolStateRAID(*):zpool status $1 | grep -E "raid|mirror" | tr -s " " | cut -d" " -f 3</p>
<p dir="auto">with result:<br />
zpoolCOUNTER = 2<br />
zpoolNAME(1) = datastore01<br />
zpoolNAME(2) = rpool<br />
zpoolStateRAID(datastore01) = ONLINE<br />
zpoolStateRAID(rpool) = ONLINE<br />
zpoolStateSTORE(datastore01) = ONLINE<br />
zpoolStateSTORE(rpool) = ONLINE</p>
<p dir="auto">Can you please help me, when I want to use  zpoolCOUNTER = 2 for instance discovery in</p>
<p dir="auto">Metric<br />
zpoolStateRAID({instance})</p>
<p dir="auto">Display name<br />
ZFS RAID Status of Pool {instance-name}</p>
<p dir="auto">Result schould be<br />
ZFS RAID Status of Pool datastore01 = ONLINE<br />
 ZFS RAID Status of Pool rpool = ONLINE</p>
<p dir="auto">How to configure Instance Discovery?<br />
Instance discovery methode:<br />
Agent List (???)</p>
<p dir="auto">List Name<br />
zpoolCOUNTER (???)</p>
<p dir="auto">But this will not work</p>
<p dir="auto">Thank you very very much<br />
Rainer</p>
]]></description><link>https://forum.netxms.org/post/34081</link><guid isPermaLink="true">https://forum.netxms.org/post/34081</guid><dc:creator><![CDATA[rainerh]]></dc:creator><pubDate>Fri, 10 Jan 2025 15:40:54 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Fri, 10 Jan 2025 14:29:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rainerh" aria-label="Profile: rainerh">@<bdi>rainerh</bdi></a> said in <a href="/post/34071">ZFS FileSystem</a>:</p>
<blockquote>
<p dir="auto">console output:<br />
root@pve110:~# zpool status rpool | grep -E "raid|mirror" | awk '{print $2}'<br />
ONLINE<br />
root@pve110:~# zpool status datastore01 | grep -E "raid|mirror" | awk '{print $2}'<br />
ONLINE</p>
<p dir="auto">NetXMS output:<br />
zpoolStateRAID(datastore01) =   raidz2-0                                      ONLINE      0    0    0<br />
zpoolStateRAID(rpool) =   mirror-0                                          ONLINE      0    0    0</p>
</blockquote>
<p dir="auto">looks like awk part did not work at all. How is it specified in agent config file, could be some issue with quotes.<br />
You can also do something like this:</p>
<pre><code>zpool status datastore01 | grep -E "raid|mirror" | tr -s " " | cut -d" " -f 4
</code></pre>
<p dir="auto">Another option is to have all the command in a separate .sh file and just call that.</p>
<p dir="auto">For zpool_influxdb, may be adding --no-histogram will print less lines. Also looks cumbersome to parse, you can try something like this:</p>
<pre><code>zpool_influxdb | "vdev=root/raidz-0\ " | cut -d',' -f 3 | cut -d'=' -f 2
</code></pre>
<p dir="auto">If you can extract names of HDDs from it's output, you can use that as external list (<a href="https://netxms.org/documentation/adminguide/agent-management.html#externallist" rel="nofollow ugc">https://netxms.org/documentation/adminguide/agent-management.html#externallist</a>) - this way you could create DCIs automatically for HDDs.</p>
]]></description><link>https://forum.netxms.org/post/34080</link><guid isPermaLink="true">https://forum.netxms.org/post/34080</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 10 Jan 2025 14:29:52 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Fri, 10 Jan 2025 07:42:36 GMT]]></title><description><![CDATA[<p dir="auto">Sorry about the next lines <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /><br />
It´s a lot.</p>
<p dir="auto">root@pve110:~# zpool_influxdb<br />
zpool_stats,name=datastore01,state=ONLINE,vdev=root alloc=7922084216832u,free=7436718833664u,size=15358803050496u,read_bytes=9190572863488u,read_errors=0u,read_ops=1743624457u,write_bytes=75531624361984u,write_errors=0u,write_ops=2847279442u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,vdev=root/raidz-0 alloc=7922084216832u,free=7436718833664u,size=15358803050496u,read_bytes=9190572863488u,read_errors=0u,read_ops=1743624457u,write_bytes=75531624361984u,write_errors=0u,write_ops=2847279442u,checksum_errors=0u,fragmentation=14u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B728202A8DA-part1,vdev=root/raidz-0/disk-0 alloc=0u,free=0u,size=0u,read_bytes=1149090598912u,read_errors=0u,read_ops=217997528u,write_bytes=9441822150656u,write_errors=0u,write_ops=355221542u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B728202A966-part1,vdev=root/raidz-0/disk-1 alloc=0u,free=0u,size=0u,read_bytes=1148579872768u,read_errors=0u,read_ops=217868646u,write_bytes=9441236426752u,write_errors=0u,write_ops=355597227u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B728202A984-part1,vdev=root/raidz-0/disk-2 alloc=0u,free=0u,size=0u,read_bytes=1149143625728u,read_errors=0u,read_ops=218012588u,write_bytes=9441759522816u,write_errors=0u,write_ops=355689495u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B728202A99A-part1,vdev=root/raidz-0/disk-3 alloc=0u,free=0u,size=0u,read_bytes=1148693905408u,read_errors=0u,read_ops=217894259u,write_bytes=9441218277376u,write_errors=0u,write_ops=355668995u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B7686B80675-part1,vdev=root/raidz-0/disk-4 alloc=0u,free=0u,size=0u,read_bytes=1149027926016u,read_errors=0u,read_ops=218037401u,write_bytes=9441705701376u,write_errors=0u,write_ops=356111426u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B7686B806C5-part1,vdev=root/raidz-0/disk-5 alloc=0u,free=0u,size=0u,read_bytes=1148363948032u,read_errors=0u,read_ops=217934364u,write_bytes=9441133146112u,write_errors=0u,write_ops=356187147u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B7686B8080E-part1,vdev=root/raidz-0/disk-6 alloc=0u,free=0u,size=0u,read_bytes=1149131272192u,read_errors=0u,read_ops=217975482u,write_bytes=9441662730240u,write_errors=0u,write_ops=356371097u,checksum_errors=0u,fragmentation=0u 1736494698741419432<br />
zpool_stats,name=datastore01,state=ONLINE,path=/dev/disk/by-id/ata-KINGSTON_SEDC600M1920G_50026B7686B8080F-part1,vdev=root/raidz-0/disk-7 <br />
...<br />
...<br />
zpool_io_size,le=4194304,name=rpool,path=/dev/disk/by-id/nvme-eui.00000000000000008ce38e1001c168c3-part3,vdev=root/mirror-0/disk-1 sync_read_ind=0u,sync_write_ind=0u,async_read_ind=0u,async_write_ind=0u,scrub_read_ind=0u,sync_read_agg=0u,sync_write_agg=0u,async_read_agg=0u,async_write_agg=0u,scrub_read_agg=0u,trim_write_ind=208u,trim_write_agg=0u,rebuild_write_ind=0u,rebuild_write_agg=0u 1736494698744262723<br />
zpool_io_size,le=8388608,name=rpool,path=/dev/disk/by-id/nvme-eui.00000000000000008ce38e1001c168c3-part3,vdev=root/mirror-0/disk-1 sync_read_ind=0u,sync_write_ind=0u,async_read_ind=0u,async_write_ind=0u,scrub_read_ind=0u,sync_read_agg=0u,sync_write_agg=0u,async_read_agg=0u,async_write_agg=0u,scrub_read_agg=0u,trim_write_ind=218u,trim_write_agg=0u,rebuild_write_ind=0u,rebuild_write_agg=0u 1736494698744262723<br />
zpool_io_size,le=+Inf,name=rpool,path=/dev/disk/by-id/nvme-eui.00000000000000008ce38e1001c168c3-part3,vdev=root/mirror-0/disk-1 sync_read_ind=0u,sync_write_ind=0u,async_read_ind=0u,async_write_ind=0u,scrub_read_ind=0u,sync_read_agg=0u,sync_write_agg=0u,async_read_agg=0u,async_write_agg=0u,scrub_read_agg=0u,trim_write_ind=8060u,trim_write_agg=0u,rebuild_write_ind=0u,rebuild_write_agg=0u 1736494698744262723<br />
zpool_vdev_queue,name=rpool,vdev=root sync_r_active=0u,sync_w_active=0u,async_r_active=0u,async_w_active=0u,async_scrub_active=0u,rebuild_active=0u,sync_r_pend=0u,sync_w_pend=0u,async_r_pend=0u,async_w_pend=0u,async_scrub_pend=0u,rebuild_pend=0u 1736494698744262723<br />
root@pve110:~#</p>
]]></description><link>https://forum.netxms.org/post/34079</link><guid isPermaLink="true">https://forum.netxms.org/post/34079</guid><dc:creator><![CDATA[rainerh]]></dc:creator><pubDate>Fri, 10 Jan 2025 07:42:36 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Thu, 09 Jan 2025 15:59:22 GMT]]></title><description><![CDATA[<p dir="auto">console output:<br />
root@pve110:~# zpool status rpool | grep -E "raid|mirror" | awk '{print $2}'<br />
ONLINE<br />
root@pve110:~# zpool status datastore01 | grep -E "raid|mirror" | awk '{print $2}'<br />
ONLINE</p>
<p dir="auto">NetXMS output:<br />
zpoolStateRAID(datastore01) = 	  raidz2-0                                       ONLINE       0     0     0<br />
zpoolStateRAID(rpool) = 	  mirror-0                                           ONLINE       0     0     0</p>
]]></description><link>https://forum.netxms.org/post/34071</link><guid isPermaLink="true">https://forum.netxms.org/post/34071</guid><dc:creator><![CDATA[rainerh]]></dc:creator><pubDate>Thu, 09 Jan 2025 15:59:22 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Thu, 09 Jan 2025 15:41:52 GMT]]></title><description><![CDATA[<p dir="auto">By the way, can you show what ouput zpool_influxdb command produces on your system? It's written that it has machine-readable format, but I was not able to find an example of output.</p>
]]></description><link>https://forum.netxms.org/post/34068</link><guid isPermaLink="true">https://forum.netxms.org/post/34068</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 09 Jan 2025 15:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Thu, 09 Jan 2025 15:37:13 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for the tip.<br />
I have done in nxagent.conf:</p>
<p dir="auto">ExternalMetric=zpoolCOUNTER:zpool list | tail -n +2 | wc -l<br />
ExternalMetric=zpoolStateRAID(*):zpool status $1 | grep -E "raid|mirror" | awk '{print $2}'</p>
<p dir="auto">2 problems:<br />
(1)<br />
line 2 resolves not only ONLINE, but in console it will work<br />
(the complete line is shown)</p>
<p dir="auto">(2)<br />
can I use zpoolCOUNTER  für Agent List in Instance Discovery?</p>
<p dir="auto">Thank You<br />
Rainer</p>
]]></description><link>https://forum.netxms.org/post/34067</link><guid isPermaLink="true">https://forum.netxms.org/post/34067</guid><dc:creator><![CDATA[rainerh]]></dc:creator><pubDate>Thu, 09 Jan 2025 15:37:13 GMT</pubDate></item><item><title><![CDATA[Reply to ZFS FileSystem on Wed, 08 Jan 2025 11:29:05 GMT]]></title><description><![CDATA[<p dir="auto">Currently you can configure something like<br />
ExternalMetric=zpoolState:zpool status | grep "state: .*"<br />
in agent configuration file. This will add zpoolState metric, which would return e.g. " state: DEGRADED", your add something after grep to cut "state: " part.<br />
It's also possible for the metric to have a parameter, which will be given to the executed command<br />
ExternalMetric=zpoolState(*):zpool status $1 | grep "state: .*"<br />
this way you can get value of zpoolState(POOL_NAME)</p>
<p dir="auto">In the future - ZFS v 2.3. will support json output (<a href="https://github.com/openzfs/zfs/issues/2626" rel="nofollow ugc">https://github.com/openzfs/zfs/issues/2626</a>). And in v. 5.2. of NetXMS we will have new external parameter mechanism that parses json, xml and plain text, so all that can be used to get zfs state.</p>
]]></description><link>https://forum.netxms.org/post/34058</link><guid isPermaLink="true">https://forum.netxms.org/post/34058</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Wed, 08 Jan 2025 11:29:05 GMT</pubDate></item></channel></rss>