Alignak-monitoring-contrib / alignak-app

Desktop application in system tray for Alignak users.
GNU Affero General Public License v3.0
6 stars 2 forks source link

Check backend connection on /realm endpoint #292

Closed mohierf closed 6 years ago

mohierf commented 6 years ago

Checking Alignak backend correct connection on /alignak is not the best solution. You'd rather check with the /realm endpoint, because it is not manadatory that an alignak item exists in the backend...

[2018-03-27,12:39:50]-alignak_backend_client.client: [ERROR] BackendException raised with code 401 and message: 401 Client Error: UNAUTHORIZED for url: https://alignak.fdj.kiosks.ipmfrance.com:443/alignak?projection=%7B%22name%22%3A+1%7D - <Response [401]>
[2018-03-27,12:39:50]-alignak_app.qobjects.systray.tray_icon: [WARNING] App check connection: Failure
algorys commented 6 years ago

@mohierf , Ok I'll correct that.

I thought this endpoint was always present.

It would be nice to indicate the endpoints, in backend documentation, that are basic available with a backend... :wink:

mohierf commented 6 years ago

+1 for you, the doc should be updated with this information.

It would even be better to check on the /user endpoint. I am doing this with the Web UI to get the logged in user information ... I assume you are still doing this in App also ?

Only realm, user, host, hostgroup and servicegroup are endpoints that will always exist because the backend creates one item for each it it does not exist ...

algorys commented 6 years ago

@mohierf ok, I've set /user endpoint for connection checks.

And I've also opened an issue for backend documentation.