Skip to content
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

Add script for ZFS snapshots #136

Merged
merged 1 commit into from
May 26, 2023
Merged

Add script for ZFS snapshots #136

merged 1 commit into from
May 26, 2023

Conversation

lstrojny
Copy link
Contributor

@lstrojny lstrojny commented Feb 6, 2023

Generates two metrics for ZFS snapshots:

  • zfs_snapshot_space_usage_bytes: snapshot space usage in bytes
  • zfs_snapshot_latest_snapshot_taken: UNIX timestamp

@dswarbrick
Copy link
Member

Please use the official Prometheus client_python library, rather than a homegrown metric printing function.

@lstrojny
Copy link
Contributor Author

@dswarbrick done

@dswarbrick
Copy link
Member

@lstrojny Can you also include some sample command outputs (in the mock/fixtures directory) and optionally a mock zfs script (see existing examples in mock directory, so that we can (eventually) write tests for this collector?

zfs-snapshots.py Outdated Show resolved Hide resolved
mock/zfs Outdated Show resolved Hide resolved
zfs-snapshots.py Outdated Show resolved Hide resolved
zfs-snapshots.py Outdated Show resolved Hide resolved
zfs-snapshots.py Outdated Show resolved Hide resolved
zfs-snapshots.py Outdated Show resolved Hide resolved
Signed-off-by: Lars Strojny <lars@strojny.net>
@dswarbrick dswarbrick merged commit fc283fe into prometheus-community:master May 26, 2023
@dswarbrick
Copy link
Member

Great stuff, thanks for your contribution.

PS: Any interest in merging the functionality of zfs_zpool.sh into this collector? 😉

@lstrojny
Copy link
Contributor Author

Thanks! I probably won’t find the time to move zfs_zpool.sh into this collector, although a general purpose zfs.py would be nice

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

Successfully merging this pull request may close these issues.

2 participants