How do i Change the 'host' tag in tick script

I want Chronograf to display the "host"name of the snmp polled device instead of the “host” tag that is from the device that is doing the polling. Is this even possible? The snmp polled device is stored in ‘sysName’ tag.

Thanks

Hello @bcoleman310,
Welcome!
What do you mean by display? Do you want to return a table with all the values of the sysName tag key? Do you have the host name of the snmp polled device written to your InfluxDB instance? Or are you looking to write those host names?
Thanks.

I’m looking to replace the host tag with the sysName tag so that in chronograf when looking at all the alarms, the hostname being displayed is actually the sysName. And yes, sysName is being stored.

If i add .tag(‘host’, somename) to the influxDBOut, this will change the host to somename in the gui. but i just cant get this to work with the sysName.
I was hoping this would work:
.tag(‘host’,{{ index .Tags “sysName” }})

But it didn’t.

So ideally i’d like to move the value of ‘host’ to ‘snmp_poller_host’, and set the sysName as ‘host’.

Thanks for helping!

Anybody have any idea how to do this?

Thanks