Merge "Replaces tab to 4 whitespaces"
This commit is contained in:
commit
f07890d8d2
@ -135,19 +135,19 @@ In particular, replace any values that have curly braces.
|
||||
Example:
|
||||
Change
|
||||
|
||||
username: {args.username}
|
||||
username: {args.username}
|
||||
|
||||
to
|
||||
to
|
||||
|
||||
username: myuser
|
||||
username: myuser
|
||||
|
||||
You must replace all of the curly brace values and you can also optionally tweak any of the other configuration items as well like a port number in the case of a port conflict. The config file options are documented in the agent.yaml.template file. You may also specify zero or more dimensions that would be included in every metric generated on that node, using the dimensions: value. Example: (include no extra dimensions on every metric)
|
||||
|
||||
dimensions: (No dimensions example)
|
||||
OR
|
||||
OR
|
||||
dimensions: (Single dimension example)
|
||||
service: nova
|
||||
OR
|
||||
OR
|
||||
dimensions: (3 dimensions example)
|
||||
service: nova
|
||||
group: group_a
|
||||
@ -206,33 +206,33 @@ The init_config section contains global configuration parameters for the plugin.
|
||||
A plugin config is specified something like this:
|
||||
|
||||
init_config:
|
||||
is_jmx: true
|
||||
is_jmx: true
|
||||
|
||||
# Metrics collected by this check. You should not have to modify this.
|
||||
conf:
|
||||
#
|
||||
# Aggregate cluster stats
|
||||
#
|
||||
- include:
|
||||
domain: '"kafka.server"'
|
||||
bean: '"kafka.server":type="BrokerTopicMetrics",name="AllTopicsBytesOutPerSec"'
|
||||
attribute:
|
||||
MeanRate:
|
||||
metric_type: counter
|
||||
alias: kafka.net.bytes_out
|
||||
# Metrics collected by this check. You should not have to modify this.
|
||||
conf:
|
||||
#
|
||||
# Aggregate cluster stats
|
||||
#
|
||||
- include:
|
||||
domain: '"kafka.server"'
|
||||
bean: '"kafka.server":type="BrokerTopicMetrics",name="AllTopicsBytesOutPerSec"'
|
||||
attribute:
|
||||
MeanRate:
|
||||
metric_type: counter
|
||||
alias: kafka.net.bytes_out
|
||||
|
||||
instances:
|
||||
- host: localhost
|
||||
port: 9999
|
||||
name: jmx_instance
|
||||
user: username
|
||||
password: password
|
||||
#java_bin_path: /path/to/java #Optional, should be set if the agent cannot find your java executable
|
||||
#trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
|
||||
#trust_store_password: password
|
||||
dimensions:
|
||||
env: stage
|
||||
newDim: test
|
||||
- host: localhost
|
||||
port: 9999
|
||||
name: jmx_instance
|
||||
user: username
|
||||
password: password
|
||||
#java_bin_path: /path/to/java #Optional, should be set if the agent cannot find your java executable
|
||||
#trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
|
||||
#trust_store_password: password
|
||||
dimensions:
|
||||
env: stage
|
||||
newDim: test
|
||||
|
||||
monasca-collector service can receive a `--config-file` argument, which represents an alternate agent configuration file, instead of the default /etc/monasca/agent.yaml.
|
||||
|
||||
|
@ -57,7 +57,7 @@ The order of precedence for all dimensions is:
|
||||
#### Common Dimensions
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| ---- | ----------- |
|
||||
| hostname | The FQDN of the host being measured. |
|
||||
| observer_host | The FQDN of the host that runs a check against another host. |
|
||||
| url | In the case of the http endpoint check the url of the http endpoint being checked. |
|
||||
@ -137,42 +137,57 @@ statsd.timing('pipeline', 2468.34) # Pipeline took 2468.34 ms to execute
|
||||
statsd.gauge('gaugething', 3.14159265) # 'gauge' would be the preferred metric type for Monitoring
|
||||
```
|
||||
|
||||
The [monasca-statsd](https://github.com/openstack/monasca-statsd library provides a python based implementation
|
||||
The [monasca-statsd](https://github.com/openstack/monasca-statsd library provides a python based implementation
|
||||
of a statsd client but also adds the ability to add dimensions to the statsd metrics for the client.
|
||||
|
||||
Here are some examples of how code can be instrumented using calls to monasca-statsd.
|
||||
```
|
||||
|
||||
* Import the module once it's installed.
|
||||
from monascastatsd import monasca_statsd
|
||||
statsd = monasca_statsd.MonascaStatsd()
|
||||
* Import the module once it's installed.
|
||||
|
||||
* Optionally, configure the host and port if you're running Statsd on a non-standard port.
|
||||
statsd.connect('localhost', 8125)
|
||||
```python
|
||||
from monascastatsd import monasca_statsd
|
||||
statsd = monasca_statsd.MonascaStatsd()
|
||||
```
|
||||
|
||||
* Increment a counter.
|
||||
statsd.increment('page_views')
|
||||
* Optionally, configure the host and port if you're running Statsd on a non-standard port.
|
||||
|
||||
With dimensions:
|
||||
statsd.increment('page_views', 5, dimensions={'Hostname': 'prod.mysql.abccorp.com'})
|
||||
```python
|
||||
statsd.connect('localhost', 8125)
|
||||
```
|
||||
|
||||
* Record a gauge 50% of the time.
|
||||
statsd.gauge('users_online', 91, sample_rate=0.5)
|
||||
* Increment a counter.
|
||||
|
||||
With dimensions:
|
||||
statsd.gauge('users_online', 91, dimensions={'Origin': 'Dev', 'Environment': 'Test'})
|
||||
```python
|
||||
statsd.increment('page_views')
|
||||
|
||||
* Time a function call.
|
||||
@statsd.timed('page.render')
|
||||
def render_page():
|
||||
# Render things...
|
||||
With dimensions:
|
||||
statsd.increment('page_views', 5, dimensions={'Hostname': 'prod.mysql.abccorp.com'})
|
||||
```
|
||||
|
||||
* Time a block of code.
|
||||
with statsd.time('database_read_time',
|
||||
dimensions={'db_host': 'mysql1.mycompany.net'}):
|
||||
# Do something...
|
||||
* Record a gauge 50% of the time.
|
||||
|
||||
```
|
||||
```python
|
||||
statsd.gauge('users_online', 91, sample_rate=0.5)
|
||||
|
||||
With dimensions:
|
||||
statsd.gauge('users_online', 91, dimensions={'Origin': 'Dev', 'Environment': 'Test'})
|
||||
```
|
||||
|
||||
* Time a function call.
|
||||
|
||||
```python
|
||||
@statsd.timed('page.render')
|
||||
def render_page():
|
||||
# Render things...
|
||||
```
|
||||
|
||||
* Time a block of code.
|
||||
|
||||
```python
|
||||
with statsd.time('database_read_time',
|
||||
dimensions={'db_host': 'mysql1.mycompany.net'}):
|
||||
# Do something...
|
||||
```
|
||||
|
||||
# License
|
||||
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
|
||||
|
@ -1766,10 +1766,10 @@ Sample config:
|
||||
init_config:
|
||||
|
||||
instances:
|
||||
user: mon_api
|
||||
password: password
|
||||
service: monasca (optional, defaults to vertica)
|
||||
timeout: 3 (optional, defaults to 3 seconds)
|
||||
user: mon_api
|
||||
password: password
|
||||
service: monasca (optional, defaults to vertica)
|
||||
timeout: 3 (optional, defaults to 3 seconds)
|
||||
```
|
||||
|
||||
| Metric Name | Dimensions | Semantics |
|
||||
@ -1777,7 +1777,7 @@ instances:
|
||||
| vertica.license_usage_percent | hostname, service=vertica| Percentage of the license size taken up. |
|
||||
| vertica.connection_status | hostname, node_name, service=vertica | Value of DB connection status (0=Healthy). |
|
||||
| vertica.node_status | hostname, node_name, service=vertica| Status of node connection (0=UP). |
|
||||
| vertica.projection.ros_count | hostname, node_name, projection_name, service=vertica| The number of ROS containers in the projection. |
|
||||
| vertica.projection.ros_count | hostname, node_name, projection_name, service=vertica| The number of ROS containers in the projection. |
|
||||
| vertica.projection.tuple_mover_mergeouts | hostname, node_name, projection_name, service=vertica | Number of current tuple mover mergeouts on this projection. |
|
||||
| vertica.projection.tuple_mover_moveouts | hostname, node_name, projection_name, service=vertica | Number of current tuple mover moveout on this projection. |
|
||||
| vertica.projection.wos_used_bytes | hostname, node_name, projection_name, service=vertica | The number of WOS bytes in the projection.). |
|
||||
@ -1802,9 +1802,9 @@ Sample config:
|
||||
init_config:
|
||||
|
||||
instances:
|
||||
host: localhost
|
||||
port: 2181
|
||||
timeout: 3
|
||||
host: localhost
|
||||
port: 2181
|
||||
timeout: 3
|
||||
```
|
||||
|
||||
The Zookeeper checks return the following metrics:
|
||||
|
Loading…
Reference in New Issue
Block a user