Nextcloud 11 - serverinfo access for monitoring

The super admin can access server info by hitting the url as follows:
https://examples.org/ocs/v2.php/apps/serverinfo/api/v1/info

How can one modify user access to that? For example, id like to setup a service which can monitor my server, but i do not want to do so with superadmin credentials. What i’d prefer to do is create a new group called “monitor” which has ONLY permissions to access the server info api. Then I figure, as a noob, that i should be able to modify a routes.php file somewhere in order to allow monitor group access alongside superadmin.

i have checked:
/var/www/nextcloud/ocs/routes.php, v1.php, v2.php
/var/www/nextcloud/apps/survey_client/appinfo/routes.php
/var/www/nextcloud/apps/serverinfo/appinfo/routes.php

but i have not found where to set a new group for action info. in the survey_client routes.php i see the following:
\OCP\API::register(
‘post’,
’/apps/survey_client/api/v1/report’,
[$application->getContainer()->query(‘EndpointController’), ‘sendReport’],
‘survey_client’,
\OCP\API::ADMIN_AUTH
);
but that is not exactly what i want. that is a post and for a report. Im looking for a get on info. Any help?

thanks,
-why_a_penny

2 Likes

I have continued searching for “Admin_Auth” in config files without much success. Having trouble figuring out how the authentication piece is happening through v1.php, v2.php then individual ruotes.php et al. any help out there?

Hi,
I agree. I would like to use server info xml for my service, but I wont use admin account for it. Is there some easy way how create user only for monitoring?
Thank you for advice
Zbynek

Can you raise it as an issue on GH please?

A monitoring user is really needed. Putting the Admin Credentials into scripts and/or zabbix is just not feasible.