gethomepage / homepage

A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
https://gethomepage.dev
GNU General Public License v3.0
18.73k stars 1.1k forks source link

Feature: Zabbix service widget #3905

Closed ping-localhost closed 1 month ago

ping-localhost commented 1 month ago

Proposed change

image

The user will be able to add the widget to the services.yaml file using the following configuration:

widget:
  type: zabbix
  url: http://zabbix.host.or.ip/zabbix
  key: your-api-key

Relevant feature request: https://github.com/gethomepage/homepage/discussions/1953

Notes

I did somewhat break the Service Widget Guidelines.

Let me know what I should change to have a valid pull request.

Type of change

Checklist:

ping-localhost commented 1 month ago

Well, you need to change both of those things, that's why we have the guidelines.

I've removed the two lowest priority fields for now.

Im certain the existing jsonrpc proxy can be modified to accept body params, or just simply adding logic to use widget.key if its supplied instead of username/pw.

I've tried to do that, by passing the params via the URL itself and then parsing it again within the proxy. Hopefully this is okay.

We now also pass the actual widget object to the sendJsonRpcRequest so we can decide if we need to use username + password or the key.

Setting up a Zabbix instance to test does not seem trivial

If you're using Proxmox, you could use tteck's proxmox scripts to setup a Zabbix LXC.

ping-localhost commented 1 month ago

As long as Authorization stays capitalized, I'm happy with the changes in 4a0b18b. Zabbix doesn't accept the API token if the header is authorization.

ping-localhost commented 1 month ago

Perfect, thank you for fixing my mistake. I'll make sure to do better on the next widget 😁

adm2k commented 1 month ago

So is this widget usable at this time? I set it up but getting this: image

ping-localhost commented 1 month ago

So is this widget usable at this time? I set it up but getting this:

There is no new release yet, so it is not available yet.

adm2k commented 1 month ago

Ok, thanks for letting me know...

ping-localhost commented 3 weeks ago

@adm2k FYI, the widget is now available

adm2k commented 2 weeks ago

Thanks, working now...