Ad Widget

Collapse

Help creating macros & templates for hdhomerun userparameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fmtaylor2
    Member
    • May 2006
    • 66

    #1

    Help creating macros & templates for hdhomerun userparameters

    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.
    Last edited by fmtaylor2; 14-01-2022, 20:31.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You have to have item for each thing you need to monitor. If you don't want to do it manually, you need to create a discovery, that does it for you. I guess you need a discovery, that will return all your IP-s and related channels and iterates over that to created items/triggers.
    If you cannot do discovery, you can probably create a input file for a script and create all those needed things over API.

    Comment

    Working...