Bases: object
Create object to interact with the Scout REST API
Parameters: | api_key (str) – API key generated by Scout to access the API |
---|
str
API key generated by Scout to access the API
logging
logger used by the class
Add the given list of roles to a server
Parameters: | notes (str) – notes to add with the marker |
---|---|
Returns: | repsonse data from ScoutApp REST API |
Return type: | dict |
Raises: | TypeError – notes must is a str |
Add the given list of roles to a server
Parameters: |
|
---|---|
Returns: | repsonse data from ScoutApp REST API |
Return type: | dict |
Raises: |
|
Delete a server from Scout
Parameters: | hostname (str) – server to delete |
---|---|
Returns: | repsonse data from ScoutApp REST API |
Return type: | dict |
Raises: | TypeError – hostname must is a str |
Get the metric data based on the given filters. More info about the metrics API endpoint can be found here: http://help.scoutapp.com/v1.2/docs/api#fetching-metrics
Parameters: | lifecycle (str, optional) – one of the following: start, end, oneoff, all (default all) |
---|---|
Returns: | list of dicts containing alert data
|
Return type: | array |
Raises: | ValueError – lifecycle not a valid option |
Get the metric data based on the given filters. More info about the metrics API endpoint can be found here: http://help.scoutapp.com/v1.2/docs/api#fetching-metrics
Parameters: |
|
---|---|
Returns: | result from the api call in the below format
|
Return type: | dict |
Raises: | None – |
Get the list of roles with their included servers
Returns: | list of roles |
---|---|
Return type: | dict |
Get the list of roles
Returns: | list of roles |
---|---|
Return type: | array |
Get the list of servers in a given role
Parameters: | role (str) – role to lookup server list of |
---|---|
Returns: | server hostname list |
Return type: | array |
Raises: | ValueError – role does not exist |
Enable or disable notifications based on server hostname
Parameters: |
|
---|---|
Returns: | repsonse data from ScoutApp REST API |
Return type: | dict |
Raises: |
|