All URIs are relative to http://log.ano.yumimobi.com/api
Method | HTTP request | Description |
---|---|---|
by_namespace | GET /system/metrics/namespace/{namespace} | Get all metrics of a namespace |
metric_names | GET /system/metrics/names | Get all metrics keys/names |
metrics | GET /system/metrics | Get all metrics |
multiple_metrics | POST /system/metrics/multiple | Get the values of multiple metrics at once |
single_metric | GET /system/metrics/{metricName} | Get a single metric |
MetricsSummaryResponse by_namespace(namespace)
Get all metrics of a namespace
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemmetricsApi()
namespace = graylog.Object() # Object |
try:
# Get all metrics of a namespace
api_response = api_instance.by_namespace(namespace)
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemmetricsApi->by_namespace: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
namespace | Object |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MetricNamesResponse metric_names()
Get all metrics keys/names
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemmetricsApi()
try:
# Get all metrics keys/names
api_response = api_instance.metric_names()
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemmetricsApi->metric_names: %s\n" % e
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MetricRegistry metrics()
Get all metrics
Note that this might return a huge result set.
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemmetricsApi()
try:
# Get all metrics
api_response = api_instance.metrics()
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemmetricsApi->metrics: %s\n" % e
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MetricsSummaryResponse multiple_metrics(requested_metrics)
Get the values of multiple metrics at once
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemmetricsApi()
requested_metrics = graylog.MetricsReadRequest() # MetricsReadRequest |
try:
# Get the values of multiple metrics at once
api_response = api_instance.multiple_metrics(requested_metrics)
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemmetricsApi->multiple_metrics: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
requested_metrics | MetricsReadRequest |
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metric single_metric(metric_name)
Get a single metric
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemmetricsApi()
metric_name = graylog.Object() # Object |
try:
# Get a single metric
api_response = api_instance.single_metric(metric_name)
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemmetricsApi->single_metric: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
metric_name | Object |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]