Closed greavette closed 1 year ago
Hello!
Please send me a screenshot of the Configuraion -> Access Control -> Permissions menu
Most likely, the user under which the template goes to the PBS API does not have enough permissions...
Minimal needed permissions for user:
/datastore
- Audit
/system/status
- Audit
/system/tasks
- Audit
Hello @vashvampir ,
Thanks very much for your reply to my post and github post...I really appreciate your input and for providing this template for all to use.
I've added more than what was required to the permissions on my PBS server. I've added Admin in fact to each of the 3 Path's you've mentioned and even added Admin to "/" for my API Token user I created.
Unfortunately my Zabbix still has the same issues with authentication errors. For example item "PBS: Node status" still has the following error: Response code "403" did not match any of the required status codes "200"
I've confirmed that the PBS.Node.Name and PBS.Token.ID, PBS.Token.Secret and Host.Conn are all correct. But when I test I see the above error:
I do receive some values from the PBS template so my token must be working in some respects. But for example if I look at the item "PBS Datastore: pbs-ds-01 total" does return a value for me but there is no way to Test and see what macro's are being used?
Do you know what in the Template enables the Test button on an item from Latest Data?
Or another example, the item "PBS: Datastores usage" does return data from my PBS server when I test:
I've confirmed that the values in PBS.Token.ID, PBS.Token.Secret and Host.Code are the same in this Item test to the above item test. I notice in the above screenshot there is an extra macro used PBS.Node.Name. Not sure why one item test works and the other has an error.
Thank you!
Hello! Testing items in this template is possible only for items with the HTTP Agent type:
pbs.ping
pbs.status.datastore-usage
pbs.node.status
pbs.tasks.failed
pbs.version
The remaining items are taken from them by parsing the above items.
If it's not difficult, can you throw off the exact text of the errors from the Zabbix server log, the version of Zabbix itself and the PBS version? I'll test it and see what could go wrong.
Hello,
Thank you for your explanation as to why some of the items are testable from the latest data > configuration of the item. I think another reason is because of the error I'm receiving on some items and there is a dependency from an item where I'm receiving the access error.
I'd be happy to share the information you requested. Hopefully this is what you are looking for.
From my /var/log/zabbix/zabbix_server.log.1 file I see the following error when Zabbix is trying to connect to my PBS server swaspbs1:
677:20221025:125915.340 error reason for "swaspbs1:pve.cluster.status" changed: Response code "403" did not match any of the required status codes "200"
My Zabbix server is version 6.0.9
My PBS Server is version 2.2-6
Thank you!
Hello.
I think problem is in the {$PBS.NODE.NAME} macro. Because API URL for tasks is /api2/json/nodes/{node}/tasks you must have exact node name in macro (same as name in PBS dashboard).
Fix is very easy because API knows "localhost":
Anyway thanks for this great template! :-)
I'm sorry, didn't have time to do this project. MR accepted, thanks! @greavette Try to test please.
Hello,
Thanks very much for making this template available for all to use. I very much appreciate your work! This template along with your PVE by HTTP are a game changer to help manage Proxmox...Great work!
I'm having an issue with some of the items from the PBS template. I'm receiving two types of errors:
Response code "400" did not match any of the required status codes "200" and Response code "403" did not match any of the required status codes "200"
In fact most of the items for this template are empty while some have an error. I'm thinking I have a permission problem. I've followed your ReadMe and added the necessary permissions. Can you provide any feedback for me on why most of the items from this template are empty and what added permissions would I need to add to get these errors resolved?
Thank you.