To be able to query the metrics of my nextcloud instance with prometheus, I use the nextcloud-exporter. There must be an acces token set in the serverinfo app for the exporter. Is there a way to set this token in the nextcloud config file instead of using the occ command (occ config:app:set serverinfo token --value “access-token”)?
I don’t understand why occ is a problem… but running
occ command results in such attribute in your
'serverinfo' => array ( 'token' => 'access-token', ),
occ config:app:set writes the config value in the database, whereas
occ config:system:set writes it in
thank you for heads up @tcit very welcome. I was not aware of this detail, always used
occ config:system:get serverinfo token and missed the difference in the OP post.