ServerService
LogLevel
Bases: Enum
DEBUG = 'debug'
class-attribute
instance-attribute
ERROR = 'error'
class-attribute
instance-attribute
FATAL = 'fatal'
class-attribute
instance-attribute
INFO = 'info'
class-attribute
instance-attribute
OFF = 'off'
class-attribute
instance-attribute
WARNING = 'warning'
class-attribute
instance-attribute
ServerService(rest)
Bases: ObjectService
Service to query common information from the TM1 Server
Source code in TM1py/Services/ServerService.py
audit_logs = AuditLogService(rest)
instance-attribute
configuration = ConfigurationService(rest)
instance-attribute
loggers = LoggerService(rest)
instance-attribute
message_logs = MessageLogService(rest)
instance-attribute
transaction_logs = TransactionLogService(rest)
instance-attribute
activate_audit_log()
deactivate_audit_log()
delete_persistent_feeders(**kwargs)
Source code in TM1py/Services/ServerService.py
execute_audit_log_delta_request(**kwargs)
execute_message_log_delta_request(**kwargs)
execute_transaction_log_delta_request(**kwargs)
get_active_configuration(**kwargs)
Read effective(!) TM1 config settings as dictionary from TM1 Server
Returns:
| Type | Description |
|---|---|
Dict
|
config as dictionary |
get_admin_host(**kwargs)
get_all_message_logger_level()
get_api_metadata()
Read effective(!) TM1 config settings as dictionary from TM1 Server
Returns:
| Type | Description |
|---|---|
|
config as dictionary |
get_audit_log_entries(user=None, object_type=None, object_name=None, since=None, until=None, top=None, **kwargs)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
UserName |
None
|
object_type
|
str
|
ObjectType |
None
|
object_name
|
str
|
ObjectName |
None
|
since
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
until
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
top
|
int
|
int |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
|
Source code in TM1py/Services/ServerService.py
get_configuration(**kwargs)
get_data_directory(**kwargs)
get_last_process_message_from_message_log(process_name, **kwargs)
Get the latest message log entry for a process
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_name
|
str
|
name of the process |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
String - the message, for instance: "Ausführung normal beendet, verstrichene Zeit 0.03 Sekunden" |
Source code in TM1py/Services/ServerService.py
get_message_log_entries(reverse=True, since=None, until=None, top=None, logger=None, level=None, msg_contains=None, msg_contains_operator='and', **kwargs)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reverse
|
bool
|
Boolean |
True
|
since
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
until
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
top
|
int
|
Integer |
None
|
logger
|
str
|
string, eg TM1.Server, TM1.Chore, TM1.Mdx.Interface, TM1.Process |
None
|
level
|
str
|
string, ERROR, WARNING, INFO, DEBUG, UNKNOWN |
None
|
msg_contains
|
Iterable
|
iterable, find substring in log message; list of substrings will be queried as AND statement |
None
|
msg_contains_operator
|
str
|
'and' or 'or' |
'and'
|
kwargs
|
|
{}
|
Returns:
| Type | Description |
|---|---|
Dict
|
Dict of server log |
Source code in TM1py/Services/ServerService.py
get_product_version(**kwargs)
get_server_name(**kwargs)
get_static_configuration(**kwargs)
get_transaction_log_entries(reverse=True, user=None, cube=None, since=None, until=None, top=None, element_tuple_filter=None, element_position_filter=None, **kwargs)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reverse
|
bool
|
Boolean |
True
|
user
|
str
|
UserName |
None
|
cube
|
str
|
CubeName |
None
|
since
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
until
|
datetime
|
of type datetime. If it doesn't have tz information, UTC is assumed. |
None
|
top
|
int
|
int |
None
|
element_tuple_filter
|
Dict[str, str]
|
of type dict. Element name as key and comparison operator as value |
None
|
element_position_filter
|
Dict[int, Dict[str, str]]
|
not yet implemented tuple={'Actual':'eq','2020': 'ge'} |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
|
Source code in TM1py/Services/ServerService.py
initialize_audit_log_delta_requests(filter=None, **kwargs)
initialize_message_log_delta_requests(filter=None, **kwargs)
initialize_transaction_log_delta_requests(filter=None, **kwargs)
save_data(**kwargs)
Source code in TM1py/Services/ServerService.py
start_performance_monitor()
stop_performance_monitor()
update_message_logger_level(logger, level)
Updates tm1 message log levels
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logger
|
|
required | |
level
|
|
required |
Returns:
| Type | Description |
|---|---|
|
|
update_static_configuration(configuration)
Update the .cfg file and triggers TM1 to re-read the file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
Dict
|
|
required |
Returns:
| Type | Description |
|---|---|
Response
|
Response |
Source code in TM1py/Services/ServerService.py
write_to_message_log(level, message, **kwargs)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
string, FATAL, ERROR, WARN, INFO, DEBUG |
required |
message
|
str
|
string |
required |
Returns:
| Type | Description |
|---|---|
None
|
|