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

Issue "Get iostats" in ZFS pool discovery #43

Open
francescoveroli opened this issue May 24, 2023 · 4 comments
Open

Issue "Get iostats" in ZFS pool discovery #43

francescoveroli opened this issue May 24, 2023 · 4 comments

Comments

@francescoveroli
Copy link

francescoveroli commented May 24, 2023

Hello,
i am using:

target Server= Ubuntu 20.04

version of zfs installed:  2.1.4-0ubuntu0.1
srcversion:     E308D3FB5CF298B22C93CCC
vermagic:       5.15.0-1026-aws SMP mod_unload modversions aarch64

zabbix_server (Zabbix) 5.4.12
zabbix_agentd (daemon) (Zabbix) 4.0.17

the item Zpool {#POOLNAME}: Get iostats in ZFS discovery pool value should be changed from
vfs.file.contents[/proc/spl/kstat/zfs/{#POOLNAME}/io]

to

vfs.file.contents[/proc/spl/kstat/zfs/{#POOLNAME}/iostats]

once i change it i am getting this error:
image

i can't modify the file manually as is autogenereted from the kernel.

i have tryed this too:
vfs.file.regexp[/proc/spl/kstat/zfs/rpool/iostats,"^[0-9]"]

it makes switch off the agent getting this error:
Screenshot 2023-05-24 at 13 04 53

any help?

thanks

@francescoveroli francescoveroli changed the title Item "Get iostats" in ZFS pool discovery issue Issue "Get iostats" in ZFS pool discovery May 24, 2023
@stevleibelt
Copy link

Than we should change to content of the template and replace io with iostats.
I had a look, it is the same on my machines (arch linux with zfs). Maybe zfs once changed it from io to iostats?

Since it is your created issue @francescoveroli, would you like to create a change request?

@francescoveroli
Copy link
Author

francescoveroli commented May 26, 2023

Than we should change to content of the template and replace io with iostats.
I had a look, it is the same on my machines (arch linux with zfs). Maybe zfs once changed it from io to iostats?

Since it is your created issue @francescoveroli, would you like to create a change request?

Thanks @stevleibelt for your quick replay. I will wait before the change request as the issue still on going, ill be happy to commit it once is fixed ;)

this is the format of my file iostats:

25 1 0x01 18 4896 5522661940 12146491108198623
name                            type data
trim_extents_written            4    0
trim_bytes_written              4    0
trim_extents_skipped            4    0
trim_bytes_skipped              4    0
trim_extents_failed             4    0
trim_bytes_failed               4    0
autotrim_extents_written        4    0
autotrim_bytes_written          4    0
autotrim_extents_skipped        4    0
autotrim_bytes_skipped          4    0
autotrim_extents_failed         4    0
autotrim_bytes_failed           4    0
simple_trim_extents_written     4    0
simple_trim_bytes_written       4    0
simple_trim_extents_skipped     4    0
simple_trim_bytes_skipped       4    0
simple_trim_extents_failed      4    0
simple_trim_bytes_failed        4    0

at the path /proc/spl/kstat/zfs/<pool_name>/iostat

and the conf of my item prototypes:
Screenshot 2023-05-26 at 11 44 53

and so the preprocessing process:
Screenshot 2023-05-26 at 11 45 14

and im still facing the same issue:
image

Screenshot 2023-05-26 at 12 42 10

what should i expect?

Thanks in advance

@stevleibelt
Copy link

@francescoveroli

I must admit, I have no idea what to expect. Once upon a time, I had a local Zabbix, than things happened and since than, I had no time to get it back online. Or in short, I am currently not using this code here.

Maybe @AceSlash knows the answer? It looks like he is the one contributed most of this project code base.

@tuxick
Copy link

tuxick commented Sep 8, 2023

I'm now testing using zpool iostat:

UserParameter=zfs.zpool.iostat[*],/sbin/zpool iostat -Hp $1

And then a master item:
name: 'ZFS get zpool iostat for {#POOLNAME}'
key: 'zfs.zpool.iostat[{#POOLNAME}]'
trends: '0'
value_type: TEXT
applications:
-
name: ZFS
-
name: 'ZFS zpool'
preprocessing:
-
type: REGEX
parameters:
- '[^ ]\s+[0-9]\s+[0-9]\s+([0-9])\s+([0-9])\s+([0-9])\s+([0-9]*)'
- '[\1, \2, \3, \4]'

and
-
name: 'ZFS zpool write ops for {#POOLNAME}'
type: DEPENDENT
key: 'zfs.zpool.ops.write[ {#POOLNAME}]'
delay: '0'
applications:
-
name: ZFS
-
name: 'ZFS zpool'
preprocessing:
-
type: JSONPATH
parameters:
- '$[1]'
master_item:
key: 'zfs.zpool.iostat[{#POOLNAME}]'

etc

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

3 participants