salt.modules.statuspage

StatusPage

Handle requests for the StatusPage API.

In the minion configuration file, the following block is required:

statuspage:
  api_key: <API_KEY>
  page_id: <PAGE_ID>

New in version 2017.7.0.

salt.modules.statuspage.create(endpoint='incidents', api_url=None, page_id=None, api_key=None, api_version=None, **kwargs)

Insert a new entry under a specific endpoint.

endpoint: incidents

Insert under this specific endpoint.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

CLI Example:

salt 'minion' statuspage.create endpoint='components' name='my component' group_id='993vgplshj12'

Example output:

minion:
    ----------
    comment:
    out:
        ----------
        created_at:
            2017-01-05T19:35:27.135Z
        description:
            None
        group_id:
            993vgplshj12
        id:
            mjkmtt5lhdgc
        name:
            my component
        page_id:
            ksdhgfyiuhaa
        position:
            7
        status:
            operational
        updated_at:
            2017-01-05T19:35:27.135Z
    result:
        True
salt.modules.statuspage.delete(endpoint='incidents', id=None, api_url=None, page_id=None, api_key=None, api_version=None)

Remove an entry from an endpoint.

endpoint: incidents

Request a specific endpoint.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

CLI Example:

salt 'minion' statuspage.delete endpoint='components' id='ftgks51sfs2d'

Example output:

minion:
    ----------
    comment:
    out:
        None
    result:
        True
salt.modules.statuspage.retrieve(endpoint='incidents', api_url=None, page_id=None, api_key=None, api_version=None)

Retrieve a specific endpoint from the Statuspage API.

endpoint: incidents

Request a specific endpoint.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

CLI Example:

salt 'minion' statuspage.retrieve components

Example output:

minion:
    ----------
    comment:
    out:
        |_
          ----------
          backfilled:
              False
          created_at:
              2015-01-26T20:25:02.702Z
          id:
              kh2qwjbheqdc36
          impact:
              major
          impact_override:
              None
          incident_updates:
              |_
                ----------
                affected_components:
                    None
                body:
                    We are currently investigating this issue.
                created_at:
                    2015-01-26T20:25:02.849Z
                display_at:
                    2015-01-26T20:25:02.849Z
                id:
                    zvx7xz2z5skr
                incident_id:
                    kh2qwjbheqdc36
                status:
                    investigating
                twitter_updated_at:
                    None
                updated_at:
                    2015-01-26T20:25:02.849Z
                wants_twitter_update:
                    False
          monitoring_at:
              None
          name:
              just testing some stuff
          page_id:
              ksdhgfyiuhaa
          postmortem_body:
              None
          postmortem_body_last_updated_at:
              None
          postmortem_ignored:
              False
          postmortem_notified_subscribers:
              False
          postmortem_notified_twitter:
              False
          postmortem_published_at:
              None
          resolved_at:
              None
          scheduled_auto_completed:
              False
          scheduled_auto_in_progress:
              False
          scheduled_for:
              None
          scheduled_remind_prior:
              False
          scheduled_reminded_at:
              None
          scheduled_until:
              None
          shortlink:
              http://stspg.io/voY
          status:
              investigating
          updated_at:
              2015-01-26T20:25:13.379Z
    result:
        True
salt.modules.statuspage.update(endpoint='incidents', id=None, api_url=None, page_id=None, api_key=None, api_version=None, **kwargs)

Update attribute(s) of a specific endpoint.

id

The unique ID of the enpoint entry.

endpoint: incidents

Endpoint name.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

CLI Example:

salt 'minion' statuspage.update id=dz959yz2nd4l status=resolved

Example output:

minion:
    ----------
    comment:
    out:
        ----------
        created_at:
            2017-01-03T15:25:30.718Z
        description:
            None
        group_id:
            993vgplshj12
        id:
            dz959yz2nd4l
        name:
            Management Portal
        page_id:
            xzwjjdw87vpf
        position:
            11
        status:
            resolved
        updated_at:
            2017-01-05T15:34:27.676Z
    result:
        True