zabbix 5.4 on centos
I need some way to make a template for my hdhomerun user parameters.
I have this:
## Signal Strength
UserParameter=hdhr.ss[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$3 }' | cut -d"=" -f2
## snq
UserParameter=hdhr.snq[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$4 }' | cut -d"=" -f2
## seq
UserParameter=hdhr.seq[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$5 }' | cut -d"=" -f2
## bps
UserParameter=hdhr.bps[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$6 }' | cut -d"=" -f2
## pps
UserParameter=hdhr.pps[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$7 }' | cut -d"=" -f2
## streaminfo
UserParameter=hdhr.si[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/streaminfo | awk '{ printf " " $$0}' ; /bin/echo
#
Which gets me the information I want, but I have a few dozen of these tuners, all with different IP addresses ($1), and multiple tuner channels ($2).
I need to make some kind of template that I can apply to the hosts that run the hdromerun_config app. I want to be able to supply the IP address of the tuners ($1) and the tuner numbers($2) and get this info to put in graphs and alerts and such. I don't want to have to add hundreds of individual items to the polling hosts by hand. I was thinking something with macros but as the hosts doing the polling do not have the same IP as the devices, I am at a loss how to set this up. Any help would be greatly appreciated.
I am probably just missing something obvious, but I can not figure it out.
I need some way to make a template for my hdhomerun user parameters.
I have this:
## Signal Strength
UserParameter=hdhr.ss[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$3 }' | cut -d"=" -f2
## snq
UserParameter=hdhr.snq[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$4 }' | cut -d"=" -f2
## seq
UserParameter=hdhr.seq[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$5 }' | cut -d"=" -f2
## bps
UserParameter=hdhr.bps[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$6 }' | cut -d"=" -f2
## pps
UserParameter=hdhr.pps[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/status | awk '{ print $$7 }' | cut -d"=" -f2
## streaminfo
UserParameter=hdhr.si[*],/usr/local/bin/hdhomerun_config $1 get /tuner$2/streaminfo | awk '{ printf " " $$0}' ; /bin/echo
#
Which gets me the information I want, but I have a few dozen of these tuners, all with different IP addresses ($1), and multiple tuner channels ($2).
I need to make some kind of template that I can apply to the hosts that run the hdromerun_config app. I want to be able to supply the IP address of the tuners ($1) and the tuner numbers($2) and get this info to put in graphs and alerts and such. I don't want to have to add hundreds of individual items to the polling hosts by hand. I was thinking something with macros but as the hosts doing the polling do not have the same IP as the devices, I am at a loss how to set this up. Any help would be greatly appreciated.
I am probably just missing something obvious, but I can not figure it out.
Comment