github.com/stakater/IngressMonitorController@v1.0.103/docs/uptimerobot-configuration.md (about)

     1  # UptimeRobot Configuration
     2  ## Fetching alert contacts from UpTime Robot
     3  
     4  In order to use Ingress Monitor controller, you need to have alert contacts added to your account. Once you add them via Dashboard, you will need their ID's. Fetching ID's is not something you can do via UpTime Robot's Dashboard. You will have to use their REST API to fetch alert contacts. To do that, run the following curl command on your terminal with your api key:
     5  
     6  ```bash
     7  curl -d "api_key=your_api_key" -X POST https://api.uptimerobot.com/v2/getAlertContacts
     8  ```
     9  
    10  You will get a response similar to what is shown below
    11  
    12  ```json
    13  [
    14    {
    15      "stat": "ok",
    16      "offset": 0,
    17      "limit": 50,
    18      "total": 1,
    19      "alert_contacts": [
    20        {
    21          "id": "123456",
    22          "friendly_name": "hello",
    23          "type": 2,
    24          "status": 2,
    25          "value": "test@test.com"
    26        }
    27      ]
    28    }
    29  ]
    30  ```
    31  
    32  Copy values of `id` field of your alert contacts which you want to use for Ingress Monitor Controller and append `_0_0` to them and seperate them by `-`. You will now have a string similar to `12345_0_0-23564_0_0`. This is basically the value you will need to specify in Ingress Monitor Controller's ConfigMap as `alertContacts`.
    33  
    34  ## Annotations
    35  
    36  Additional uptime robot configurations can be added through a set of annotations to each ingress object, the current supported annotations are:
    37  
    38  |                        Annotation                    |                    Description                               |
    39  |:----------------------------------------------------:|:------------------------------------------------------------:|
    40  | uptimerobot.monitor.stakater.com/alert-contacts       | The uptimerobot alertContacts to be associated with this monitor. Overrides the value of `alertContacts` from the Controller's ConfigMap. See [Fetching alert contacts from UpTime Robot](https://github.com/stakater/IngressMonitorController/blob/master/docs/uptimerobot-configuration.md) |
    41  | uptimerobot.monitor.stakater.com/interval            | The uptimerobot check interval in seconds                    |
    42  | uptimerobot.monitor.stakater.com/status-pages        | The uptimerobot public status page ID to add this monitor to. Multiple values can be given as a dash delimited string, e.g. 12345-32135-490923|
    43  | uptimerobot.monitor.stakater.com/maintenance-windows | Add a maintenance windows to this check (Pro Plan only)      |
    44  | uptimerobot.monitor.stakater.com/monitor-type        | The uptimerobot monitor type (http or keyword)               |
    45  | uptimerobot.monitor.stakater.com/keyword-exists      | Alert if value exist (yes) or doesn't exist (no) (Only if monitor-type is keyword)|
    46  | uptimerobot.monitor.stakater.com/keyword-value       | keyword to check on URL (e.g.'search' or '404') (Only if monitor-type is keyword)|
    47  
    48  ### Fetching public status page ids from UpTime Robot
    49  
    50  In order to use public status pages with the Ingress Monitor Controller you will need to have create one via the user interface.
    51  
    52  You can then use their REST API to fetch the public status page id. To do that, run the following curl command on your terminal with your api key:
    53  
    54  ```bash
    55  curl -d "api_key=your_api_key" -X POST https://api.uptimerobot.com/v2/getPsps
    56  ```
    57  
    58  You will get a response similar to what is shown below
    59  
    60  ```json
    61  {
    62    "stat": "ok",
    63    "pagination":
    64    {
    65      "offset": 0,
    66      "limit": 50,
    67      "total": 1
    68    },
    69    "psps":
    70    [
    71      {
    72        "id": 12345,
    73        "friendly_name": "my-public-status-page",
    74        "monitors": 0,
    75        "sort": 1,
    76        "status": 1,
    77        "standard_url": "https://stats.uptimerobot.com/12345678",
    78        "custom_url": ""
    79      }
    80    ]
    81  }
    82  ```
    83  
    84  Copy values of `id` field of your public status page which you want to use for Ingress Monitor Controller into the relevant ingress annotation.
    85  
    86  ### Fetching maintenance windows from UpTime Robot
    87  
    88  To use maintenance windows, you must have a Pro account and have them configured in your account. Once you add them via Dashboard, you will need their ID's. Fetching ID's is not something you can do via UpTime Robot's Dashboard. You will have to use their REST API to fetch maintenance windows. To do that, run the following curl command on your terminal with your api key:
    89  
    90  ```bash
    91  curl -d "api_key=your_api_key" -X POST https://api.uptimerobot.com/v2/getMWindows
    92  ```
    93  
    94  You will get a response similar to what is shown below
    95  
    96  ```json
    97  {
    98      "stat":"ok",
    99      "pagination":
   100      {
   101          "limit":50,
   102          "offset":0,
   103          "total":2
   104      },
   105      "mwindows":
   106      [
   107          {
   108              "id":12345,
   109              "type":3,
   110              "friendly_name":"Week night maintenance slots",
   111              "start_time":"22:00",
   112              "duration":60,
   113              "value":"1,2,3,4,5",
   114              "status":1
   115          }
   116      ]
   117  }
   118  ```
   119  
   120  Copy values of `id` field of the maintenance windows which you want to use for Ingress Monitor Controller and separate them by `-`. You will now have a string similar to `12345-23564`. This is basically the value you will need to specify in the maintenance-windows ingress annotation.