diasdmhub / AdGuard_Home_Zabbix_Template

Zabbix template to monitor your AdGuard Home instance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsupported item key.

insuusvenerati opened this issue · comments

commented

Hi there! This is awesome.

Do you know how I can fix all Adguard template items showing Unsupported item key. errors? I'm using the agent in active mode.

First, please, revise the template macros set in your Zabbix host. They are used to connect to your AdGuard Home instance.

For an active Zabbix Agent, the system.run[*] parameter must be enabled in your agent configuration.

Also note that the General Status, Statistics and Filter items use the Zabbix host interface information, the built-in {HOST.CONN} macro. Therefore, your Zabbix host interface should use the IP/domain of your AdGuard Home instance.

Can you provide any other information about your environment?

  • What version of the template did you download? Is it the latest, 6412?
  • What is your Zabbix version?
  • Which items are showing you the "Unsupported item key" error?
commented

Thanks for the reply. I'm running the latest version of the template and zabbix 6.4. I now have system.run allowed. I managed to fix the issue with the unsupported item key but now i'm getting 1. Failed: cannot extract value from json by path "$.protection_enabled": invalid object format, expected opening character '{' or '[' at: ''

It's happening on these items https://i.imgur.com/VLcKdSS.png

Oh I should mention this only seems to happen with the Adguard home stats by agent template

The error you mention says that the AdGuard Home Status Protection item received an empty value (at: ''), but it was expecting braces '{' or brackets '[' at the beginning of the JSON. This is an item that depends on the AdGuard Home General Status master item.

If a master item is unsupported, dependent items will also be unsupported because no data will be sent to them.

Make sure you have enabled system.run[*] and restarted your Zabbix Agent afterwards.
You can read more about system.run here.

Also, make sure that your AdGuard Home instance allows requests from itself (to the host interface).

Can you show me what errors are displayed for your AdGuard Home General Status and AdGuard Home Statistics items in your host?

commented

The error you mention says that the AdGuard Home Status Protection item received an empty value (at: ''), but it was expecting braces '{' or brackets '[' at the beginning of the JSON. This is an item that depends on the AdGuard Home General Status master item.

If a master item is unsupported, dependent items will also be unsupported because no data will be sent to them.

Make sure you have enabled system.run[*] and restarted your Zabbix Agent afterwards. You can read more about system.run here.

Also, make sure that your AdGuard Home instance allows requests from itself (to the host interface).

Can you show me what errors are displayed for your AdGuard Home General Status and AdGuard Home Statistics items in your host?

Both of those master items have no values. I can't execute them manually and I can't Test them. All those options are greyed out. I have system.run allowed. How do I ensure Adguard is allowing requests from itself?

commented

I figured it out! Turns out I had SSL enabled on the AGH side so the curl was always directing and you couldn't query via localhost without ssl errors. I disabled encryption on AGH and put a proxy in front and now everything looks good!

I see. I'm glad it worked out for you.

The {$ADGUARD.WEB} helps in this scenario with encrypted connections. You can change the macro value to https in your host configuration.
The system.run key executes a cURL command on the AGH host. The command will fail if the SSL certificate is not valid or trusted.

To facilitate troubleshooting, I will add a --show-error option to the cURL command.
Note that since the master item does not store values, the error will only be displayed in Zabbix when testing the item.