CloudMonitor

class CloudMonitor.CloudMonitor(env, region=None)[source]

Bases: Cloud.Cloud

service = 'Monitoring'
getAccount()[source]

Returns account information.

Arguments:

Returns: JSON results as python dict

updateAccount(metaDict={}, token=None)[source]

Update properties on an account.

Arguments: metaDict - metadata key-value pairs in form of python dictionary (Optional) token – webhook token (Optional)

Returns: status code

getLimits()[source]

Returns account resource limits.

Arguments:

Returns: JSON results as python dict

getAudits(limit=None, From=None, To=None, reverse=False, marker=None)[source]

Lists audits for this account.

Arguments:

From – query start date*

To – query end date*

reverse – enabled specifying that time sequenced data be returned in reverse order

marker – used to mark query when retrieving info in subsequent queries

limit – when not specifed in the endpoint actually defaults to 100

  • *These parameters take integer values, which are interpreted as timestamps expressed in milliseconds since 00:00:00 UTC on January 1, 1970. If the to value is not specified it defaults to the current time. Each time series collection specifies a default offset from the current time, which is used when the from value is not supplied. For example, if no to or from values are specified when retrieving an alarm history, then it will be treated as a query for the last 7 days of data.

To convert a particular time to UTC, you can use the date +%s000 command or a website such as

If no ‘to’ or ‘from’ values are specified, then it will be treated as a query for the last 7 days of data.

Returns: JSON results as python dict

getEntities(limit=None, From=None, To=None, reverse=False, marker=None)[source]

Lists the entities on the account.

Arguments:

From – query start date*

To – query end date*

reverse – enabled specifying that time sequenced data be returned in reverse order

marker – used to mark query when retrieving info in subsequent queries

limit – when not specifed in the endpoint actually defaults to 100

  • *These parameters take integer values, which are interpreted as timestamps expressed in milliseconds since 00:00:00 UTC on January 1, 1970. If the to value is not specified it defaults to the current time. Each time series collection specifies a default offset from the current time, which is used when the from value is not supplied. For example, if no to or from values are specified when retrieving an alarm history, then it will be treated as a query for the last 7 days of data.

To convert a particular time to UTC, you can use the date +%s000 command or a website such as

If no ‘to’ or ‘from’ values are specified, then it will be treated as a query for the last 7 days of data.

Returns: JSON results as python dict, including ‘metadata’

getEntity(eId)[source]

Retrieves the current state of an entity.

Arguments: eId – entity id

Returns: JSON results as python dict

createEntity(label, attrDict={})[source]

Creates a new entity.

Arguments: label – attrDict – python dictionary of arg options:

agent_id – (Optional) ip_addresses - ip’s in form of python dictionary (Optional) metadata - metadata key-value pairs in form of python dictionary (Optional)

Returns: status code

updateEntity(eId, label, attrDict={})[source]

Updates an entity specified by the entityId (id).

Arguments: eId – entity id label – (Optional) attrDict – python dictionary of arg options:

agent_id – (Optional) ip_addresses - ip’s in form of python dictionary (Optional) metadata - metadata key-value pairs in form of python dictionary (Optional)

Returns: status code

deleteEntity(eId)[source]

Delete an entity.

Arguments: eId – entity id

Returns: status code

createCheck(entityId, attrDict={}, testMode=False)[source]

Creates (or test creates) a new check associated with an entity.

Arguments: entityId – attrDict – python dictionary of options:

type – remote.dns / remote.ssh / remote.smtp / remote.http /
remote.tcp / remote.ping / remote.ftp-banner / remote.imap-banner / remote.pop3-banner / remote.smtp-banner / remote.postgresql-banner / remote.telnet-banner / remote.mysql-banner / remote.mssql-banner (Required)

details – (Optional) disabled – (Optional) label – (Optional) metadataDict – metadata python dict of key/value pairs (Optional) period – (Optional) timeout – (Optional) monitoringZonesPoll – (for remote checks) (Optional) targetAlias – (for remote checks) (Optional) targetHost – (for remote checks) (Optional) targetResolver – (for remote checks) (Optional)

testMode – true/false (default=True)

Returns: status code

testCheck(entityId, attrDict={})[source]

Tests the creation of a new check associated with an entity.

Arguments: entityId – entity id attrDict – python dictionary:

type – remote.dns / remote.ssh / remote.smtp / remote.http /
remote.tcp / remote.ping / remote.ftp-banner / remote.imap-banner / remote.pop3-banner / remote.smtp-banner / remote.postgresql-banner / remote.telnet-banner / remote.mysql-banner / remote.mssql-banner

details – (Optional) disabled – (Optional) label – (Optional) metadataDict – metadata python dict of key/value pairs (Optional) period – (Optional) timeout – (Optional) monitoringZonesPoll – (for remote checks) (Optional) targetAlias – (for remote checks) (Optional) targetHost – (for remote checks) (Optional) targetResolver – (for remote checks) (Optional)

Returns: status code

getCheck(entityId, checkId)[source]

Returns the specified check.

Arguments: entityId – checkId –

Returns: status code.

getChecks(entityId)[source]

Lists checks associated with an entityId.

Arguments: entityId –

Returns: JSON results as python dict

testRunCheck(entityId, checkId)[source]

Test a check inline.

Arguments: entityId – checkId –

Returns: status code.

updateCheck(entityId, checkId, attrDict={})[source]

Updates a check associated with an entity.

Arguments: entityId – attrDict – python dictionary or optional args:

type – remote.dns / remote.ssh / remote.smtp / remote.http /
remote.tcp / remote.ping / remote.ftp-banner / remote.imap-banner / remote.pop3-banner / remote.smtp-banner / remote.postgresql-banner / remote.telnet-banner / remote.mysql-banner / remote.mssql-banner (Required)

details – (Optional) disabled – (Optional) label – (Optional) metadata – metadata python dict of key/value pairs (Optional) period – (Optional) timeout – (Optional) monitoringZonePoll – (for remote checks) (Optional) targetAlias – (for remote checks) (Optional) targetHost – (for remote checks) (Optional) targetResolver – (for remote checks) (Optional)

Returns: status code

deleteCheck(entityId, checkId)[source]

Deletes a check.

Arguments: entityId – checkId –

Returns: status code

getCheckType(id)[source]

Returns the specified check type.

Arguments: id – check type id

Returns: status code.

getCheckTypes()[source]

List available check types.

Arguments:

Returns: JSON results as python dict

createAlarm(entityId, checkId, planId, attrDict={}, testMode=False)[source]

Create (or test run the creation of) a(n) new alarm.

Arguments: entityId – checkId – The ID of the check to alert on. (string) planId – The ID of the notification plan to execute when the state changes. attrDict – python dict options:

criteria – (Optional) disabled – Disable processing and alerts on this alarm (Optional)(Boolean) label – (Optional) metadata – python dict of metadata key value pairs (Optional)

testMode – true/false (default=False)

Returns: status code

testAlarm(entityId, checkId, planId, attrDict={})[source]

Test run the creation of an alarm.

Arguments: entityId – checkId – planId – notification plan id attrDict – python dict options:

criteria – (Optional) label – (Optional) metadataDict – python dict of metadata key value pairs (Optional)

Returns: status code

getAlarm(entityId, alarmId)[source]

Returns the specified alarm.

Arguments: entityId – alarmId –

Returns: status code.

getAlarms(entityId)[source]

Lists alarms associated with an entityId.

Arguments: entityId –

Returns: JSON results as python dict

updateAlarm(entityId, alarmId, attrDict={})[source]

Update an alarm associated with an entity.

Update an alarm with the specified alarmId. Partial updates to an alarm are acceptable. You may specify only the parameters you would like to update.

Arguments: entityId – alarmId – attrDict – python dict options:

checkId – The ID of the check to alert on. planId – notification plan id (Optional) criteria – (Optional) label – (Optional) disabled – Disable processing and alerts on this alarm (Optional) (Boolean) metadataDict – python dict of metadata key value pairs (Optional)

Returns: status code

deleteAlarm(entityId, alarmId)[source]

Deletes an alarm.

Arguments: entityId – alarmId –

Returns: status code

createNPlan(label, attrDict={})[source]

Creates a notification plan.

Arguments: label – attrDict – python dict options:

critical_state – ok_state – warning_state –

Returns: status code

getNPlans()[source]

Lists notification plans for current account.

Arguments:

Returns: JSON results as python dict

getNPlan(npId)[source]

Returns the specified notification plan.

Arguments: nplanId –

Returns: status code.

updateNPlan(npId, attrDict={})[source]

Update a notification plan associated with an entity.

Arguments: nplanId – attrDict – python dict of option args:

label – critical_state – ok_state – warning_state –

Returns: status code

deleteNPlan(npId)[source]

Deletes a notification plan.

Arguments: entityId – nplanId –

Returns: status code

getMZones()[source]

List monitoring zones.

Arguments:

Returns: JSON results as python dict

getMZone(mzoneId)[source]

Returns the specified monitoring zone.

Arguments: mzoneId –

Returns: status code.

traceMZone(mzoneId, target, attrDict={})[source]

Perform a traceroute from a collector in the specified monitoring zones.

Arguments: mzoneId – target – target ip or hostname attrDict – python dict options:

targetResolver – IPv6 / IPv6 (Optional)

Returns: status code.

discoverAlarmHistory(entityId, alarmId)[source]

List checks for which alarm notification history is available.

Arguments: entityId – alarmId –

Returns: JSON results as python dict

getAlarmHistory(entityId, alarmId, checkId, uuid=None)[source]

List checks for which alarm notification history is available – or if uuid is provided, retrieves a single alarm notification history item.

Arguments: entityId – alarmId – checkId – uuid – id of a single alarm notification history item (Optional)

Returns: JSON results as python dict

createNotification(label, type, details, testMode=False)[source]

Create (or test the creation of ) a notification.

Arguments: label – type – webhook / email details – testMode – true/false (default=False)

Returns: status code

testNotification(label, type, details)[source]

Tests the creation of a notification.

Arguments: label – type – webhook / email details –

Returns: status code

getNotification(noteId)[source]

Returns the specified notification.

Arguments: noteId –

Returns: status code.

getNotifications()[source]

Lists notifications.

Arguments:

Returns: JSON results as python dict

testRunNotification(noteId)[source]

Test a notification inline.

Arguments: noteId –

Returns: status code.

updateNotification(noteId, attrDict={})[source]

Updates a notification.

Arguments: noteId – attrDict – python dict options:

details – label – type – webhook / email

Returns: status code

deleteNotification(noteId)[source]

Deletes a notification.

Arguments: noteId –

Returns: status code

getNotificationType(ntId)[source]

Returns the specified notification type.

Arguments: ntId – notification type id

Returns: status code.

getNotificationTypes()[source]

List available notification types.

Arguments:

Returns: JSON results as python dict

getAlarmChangelogs(entityId=None)[source]

Lists alarm changelogs for this account, filtered by a given entity ID

Arguments:
entityId – Entity ID, by which to filter results

Returns: JSON results as python dict

getOverview()[source]

Return the overview.

Arguments:

Returns: JSON results as python dict

getAlarmExamples()[source]

Return list of alarm examples.

Arguments:

Returns: JSON results as python dict

getAlarmExample(aeId)[source]

Retrieve alarm example.

Arguments: aeId – alarm example id

Returns: status code.

evalAlarmExample(aeId, evalDict)[source]

Evaluate alarm example.

Arguments: aeId – alarm example id evalDict – python dict of key/value pairs

Returns: status code.

Previous topic

CloudLB

Next topic

CloudNetworks