Skip to content

Commit

Permalink
Merge pull request #110 from CoScale/docs-generic_script_update
Browse files Browse the repository at this point in the history
Update generic_script docs to remove period, maxruntime and tags
  • Loading branch information
kidk authored May 30, 2018
2 parents 70e7de8 + ec62caa commit e06cbb4
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions _docs_custom_metrics/generic-script/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@ This is an **example** output of a script in **configuration mode**:

{% highlight json %}
{
"maxruntime": 5000,
"period": 60,
"metrics": [{
"id": 1,
"name": "Incoming traffic on interface",
"description": "Incoming traffic in bytes on network interface",
"groups": "Networking/Traffic",
"unit": "b/s",
"tags": "NETWORK",
"datatype": "GUAGE",
"calctype": "Instant",
"dimensions": [
Expand All @@ -64,7 +61,6 @@ This is an **example** output of a script in **configuration mode**:
"description": "Description for second metric",
"groups": "MyMetrics/Category2",
"unit": "",
"tags": "MYTAG1,MYTAG2",
"datatype": "DOUBLE",
"calctype": "Difference",
"dimensions": [
Expand All @@ -83,14 +79,6 @@ This is an **example** output of a script in **configuration mode**:
}
{% endhighlight %}

#### maxruntime

The maximum amount of time (in milliseconds) the script is allowed to run in data retrieval mode, if the runtime exceeds this value the script will be stopped. The maximum value for maxruntime is 50000 (50 seconds).

#### period

Time interval (in seconds) between agent polls that retrieve the data. The minimum value for period is 60 (1 minute).


#### Metric fields

Expand All @@ -103,16 +91,15 @@ Time interval (in seconds) between agent polls that retrieve the data. The minim
| `description` | Description of the metric. |
| `groups` | The metric groups that this metric should be added to (comma separated). Nested groups should be separated by a `/`. |
| `unit` | The unit for the metric (shown on the Y-axis in the UI). |
| `tags` | You can add a tag to add extra meaning to a metric (i.e. NETWORK). |
| `datatype` | The data type of the created metric. The following options are available for the `datatype`: |
| | - DOUBLE: value at this point in time (eg. memory usage) |
| `datatype` | The data type of the created metric. The following 3 options are available for the `datatype`: |
| | - GAUGE: value at this point in time (eg. memory usage) |
| | - COUNT: a number per a given interval (eg. number of log lines added) |
| | - COUNTER: keeps increasing over time (eg. total number of log lines). You can graph the diffs on the totals in the UI. |
| | More information about these datatypes can be found on [the metrics 2.0 website](http://metrics20.org/spec/). |
| `calctype` | The calculation performed on the data returned by the script. The following 3 options are available for the `calctype`: |
| | - Instant: the metric data is the data returned by the script. |
| | - Difference: the metric data is the difference between the last value returned by the script and the current value. |
| `dimensions` | The dimensions for the metric. The dimension `id` will be used in the **data retreival** mode. |
| `dimensions` | The dimensions for the metric. The dimension `id` will be used in the **data retrieval** mode. |



Expand Down

0 comments on commit e06cbb4

Please sign in to comment.