Change to /system/cluster/stats/mongo?


(Jason Haar) #1

Hi there

I just upgraded to 2.4.6 and for the first time in ages ran a script I had been working on for detecting outages/etc in graylog. I used “localhost:12900/system/cluster/stats/mongo” to check to see if mongodb was working.

Anyway, now it appears I’m being asked to do HTTP Basic auth (that was mentioned in the release notes for 2.4.6) - but now it’s returning ““server_status”:null” whereas it used to return ““server_status”:available”

Was that intentional? It’s made the API not as useful

Thanks

Jason


(Jochen) #2

Make sure that the MongoDB user account used by Graylog is allowed to run the serverStatus admin command.
See https://docs.mongodb.com/v3.6/reference/command/serverStatus/ for details.


(Jason Haar) #3

That is the problem. But what role is needed for that? The only references I can find imply the username that graylog uses has to have full admin perms for the entire mongodb server, surely it doesn’t need that?


(Jochen) #4

The MongoDB user needs to have the serverStatus privilege.
https://docs.mongodb.com/v3.6/reference/privilege-actions/#serverStatus


(system) #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.