@pomby/consolealerts

1.0.1 • Public • Published

@pomby/consolealerts

A library for use with pomby to add alerts to the console

Sample Config

In your config you can add something like the following to your config:

{
  "consoleAlerts": [
    {
      "type": ["fail"],
      "output": "error",
      "template": "[{runTimeISO}] There was an error: {statusCode} with monitor: {title} in category {category}"
    }
  ]
}

The type is the only required portion, output will default to info and template will default to "Console Alert Triggered for: {title}"

Template Variables

  • title - Title of the monitor
  • runTime - Date of the run
  • runTimeISO - Date fo the run but formatted in ISO format
  • timing - Time in ms the run took
  • statusCode - Status code of the run (only on error)
  • type - Monitor Type used
  • category - Monitor Category

Types:

  • success
  • fail
  • noResponse
  • error
  • slow
  • testFail
  • badConfig

Readme

Keywords

none

Package Sidebar

Install

npm i @pomby/consolealerts

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

11.1 kB

Total Files

6

Last publish

Collaborators

  • mikevalstar