Browse Source

Filter based on monitor tags when getting all monitors

pull/55/head
Rahman 9 years ago
committed by GitHub
parent
commit
24fabce465
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lib/api/monitor.js

+ 4
- 0
lib/api/monitor.js View File

@ -100,6 +100,7 @@ function get(monitorId, groupStates, callback){
* optional, an object containing any of the following
* * group_states: an array containing any of the following "all", "alert", "warn", or "no data"
* * tags: an array of "tag:value"'s to filter on
* * monitor_tags: a comma separated list indicating what service and/or custom tags
* callback: function(err, res)
*example: |
* ```javascript
@ -128,6 +129,9 @@ function getAll(options, callback){
if(options.tags){
params.query.tags = options.tags.join(",");
}
if(options.monitor_tags){
params.query.monitor_tags = options.monitor_tags.join(",");
}
}
client.request("GET", "/monitor", params, callback);
}


Loading…
Cancel
Save