Analysis and Diagnostics
The analysis and Diagnostics module can be used to gather logs from a Verify Identity Access deployment as well as monitor system health and collect resource usage (CPU, memory, disk, network latency).
- class pyivia.core.analysisdiagnostics.AnalysisDiagnostics
Object is used to manage and collect log files from Verify Identity Access deployments
- Variables:
application_logs – retrieve log files generated by verify identity access runtime applications
remote_syslog – manage remote syslog configuration used by Verify Identity Access.
Application Logs
- class pyivia.core.analysis.applicationlog.ApplicationLog(base_url, username, password)
- clear_application_logs(paths=[])
Clear one or more log files on an appliance
- Parameters:
paths (
list
ofstr
) – The list of files to clear.- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute
- Return type:
Response
- delete_application_logs(paths=[])
Delete one or more log files on an appliance
- Parameters:
paths (
list
ofstr
) – The list of files to be removed.- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute
- Return type:
Response
- get_application_log(path)
Download a log file from an applaince
- Parameters:
path (
str
) – The relative path of the file to be retrieved.- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute
If the request is successful the file contents is returned as JSON and can be accessed from the response.json attribute
- Return type:
Response
Remote Syslog
- class pyivia.core.analysis.remotesyslog.RemoteSyslog(base_url, username, password)
- add_server(server=None, port=None, debug=None, protocol=None, format=None, keyfile=None, ca_certificate=None, client_certificate=None, permitted_peers=None, sources=[])
Add a Remote Syslog configuration.
- Parameters:
server – (
str
): The IP address or host name of the remote syslog server.port (int) – The port on which the remote syslog server is listening.
debug (bool) – Whether the forwarder process will be started in debug mode. All trace messages will be sent to the log file of the remote syslog forwarder.
protocol (
str
) – The protocol which will be used when communicating with the remote syslog server. Valid options includeudp
,tcp
ortls
.format (
str
, optional) – The format of the messages which are forwarded to the rsyslog server. Valid options includerfc-3164
orrfc-5424
.keyfile (
str
, optional) – The name of the key file which contains the SSL certificates used when communicating with the remote syslog server (e.g. pdsrv). This option is required if the protocol istls
.ca_certificate (
str
, optional) – The label which is used to identify within the SSL key file the CA certificate of the remote syslog server. This option is required if the protocol istls
.client_certificate (
str
, optional) – The label which is used to identify within the SSL key file the client certificate which will be used during mutual authentication with the remote syslog server.permitted_peers (
str
, optional) – The subject DN of the remote syslog server. If this policy data is not specified any certificates which have been signed by the CA will be accepted.sources (
list
dict
) –The source of the log file entries which will be sent to the remote syslog server. The format of the dictionary is:
{ "name": "WebSEAL:default:request.log", "tag": "WebSEAL", "facility": "local0", "severity": "debug" }
- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute.
- Return type:
Response
- get(source=None)
Get the configuration for the given Remote Syslog source.
- Parameters:
source (
str
) – The name of the log source. It can be eitherwebseal
,azn_server
,policy_server
orruntime_logs
.- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute.
If the request is successful the remote system logger properties is returned as JSON and can be accessed from the response.json attribute
- Return type:
Response
- list()
List the Remote Syslog configuration.
- Returns:
The response from verify identity access.
Success can be checked by examining the response.success boolean attribute.
If the request is successful the remote system logger properties are returned as JSON and can be accessed from the response.json attribute
- Return type:
Response