Hacky RBAC API for monitoring

Pandry

Cadet
Joined
Aug 5, 2021
Messages
2
Hi there!
I'm setting up a TrueNAS box for doing backups and I would like to monitor it (being more precise, I would like to monitor the last execution and the outcome of the replication jobs).
Our monitoring system at the moment is Zabbix but I don't think that's important anyway.
I gave a look at the SNMP MIBs but found nothing about general alerts or jobs status, so I proceeded with the API.
My issue here is that the API key has the same privileges as the root user and I can't even give a read-only capability.
What I was thinking to do is to tamper with the NGINX reverse proxy already installed in the TrueNAS system by adding some custom rules to allow only get request and tamper around with the request, but I'm not sure about how it will play with updates.
Any ideas?

Unfortunately, I'm not familiar with FreeBSD, but could a jail help here?
I was wondering about listening on an unused port with an NGINX in a jail and redirect the allowed calls to the TrueNAS' NGINX.
Thanks in advance
 
Top