Skip to content

ZFS datasets without / are ommited #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
foxycode opened this issue Apr 17, 2023 · 0 comments
Open

ZFS datasets without / are ommited #45

foxycode opened this issue Apr 17, 2023 · 0 comments

Comments

@foxycode
Copy link
Contributor

Just had big problem with customer because monitoring didn't sent alert.

Problem is with this line:

DISKs=$(echo -ne $(df -PB1 | awk '$1 ~ /\// {print}' | awk '{ print $(NF)","$2","$3","$4";" }') | gzip -cf | base64)

When I have datasets without / like data or storage, they are ommited and thus alert are not sent for them.

# df -PB1
Filesystem                                                                              1-blocks          Used    Available Capacity Mounted on
rpool/ROOT/ubuntu                                                                    69675253760    7384203264  62291050496      11% /
rpool/USERDATA/root                                                                  62951522304     660471808  62291050496       2% /root
rpool/ROOT/ubuntu/srv                                                                62291181568        131072  62291050496       1% /srv
bpool/BOOT/ubuntu                                                                     1355284480     198574080   1156710400      15% /boot
data                                                                                700324773888  255627624448 444697149440      37% /data
storage                                                                            3851590041600 3267272638464 584317403136      85% /storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant