linotp.controllers.monitoring module

monitoring controller - interfaces to monitor LinOTP

class linotp.controllers.monitoring.MonitoringController(name, install_name='', **kwargs)

Bases: BaseController

monitoring

activeUsers()

GET, POST /monitoring/activeUsers

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

for each realm, display the resolvers and the number of users which have at least one assigned active token per resolver the ‘total’ gives the number of all users, which are in an allowed realm and own an active token users are conted per resolver (not per realm), so if resolver is in multiple realms and one user ons tokens in 2 realms, the user will be counted only once

Parameters

realms – (optional) takes realms, only information on these realms will be displayed

Returns

a json result with a boolean status and request result

Raises

Exception – if an error occurs an exception is serialized and returned

config()

GET, POST /monitoring/config

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

check if Config- Database exists

touches DB and checks if date of last read is new

Returns

a json result with: { “head”: [], “value”: {“sync”: “True”} }

Raises

Exception – if an error occurs an exception is serialized and returned

license()

GET, POST /monitoring/license

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

license return the support status, which is community support by default or the support subscription info, which could be the old license

Returns

json result with license info

Raises

Exception – if an error occurs an exception is serialized and returned

storageEncryption()

GET, POST /monitoring/storageEncryption

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

check if hsm/enckey encrypts value before storing it to config db

Returns

a json result with true if a new value gets encryptet before beeing stored in db

Raises

Exception – if an error occurs an exception is serialized and returned

tokens()

GET, POST /monitoring/tokens

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

Displays the number of tokens (with status) per realm (one token might be in multiple realms). The Summary gives the sum of all tokens in all given realms and might be smaller than the summ of all tokens as tokens which have two realms are only counted once!

Parameters

status – (optional) takes assigned or unassigned, give the number of tokens with this characteristic

;param realms: (optional) takes realms, only the number of tokens in

these realms will be displayed

Returns

a json result with: { “head”: [], “data”: [ [row1], [row2] .. ] }

Raises

Exception – if an error occurs an exception is serialized and returned

userinfo()

GET, POST /monitoring/userinfo

Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.

for each realm, display the resolvers and the number of users per resolver

Parameters

realms – (optional) takes a realm, only information on this realm will be displayed

Returns

a json result with: { “head”: [], “data”: [ [row1], [row2] .. ] }