All URIs are relative to http://log.ano.yumimobi.com/api
Method | HTTP request | Description |
---|---|---|
bulk_update_patterns | PUT /system/grok | Add a list of new patterns |
create_pattern | POST /system/grok | Add a new named pattern |
list_grok_patterns | GET /system/grok | Get all existing grok patterns |
list_pattern | GET /system/grok/{patternId} | Get the existing grok pattern |
remove_pattern | DELETE /system/grok/{patternId} | Remove an existing pattern by id |
update_pattern | PUT /system/grok/{patternId} | Update an existing pattern |
bulk_update_patterns(patterns, replace=replace)
Add a list of new patterns
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
patterns = graylog.GrokPatternList() # GrokPatternList |
replace = graylog.Object() # Object | Replace all patterns with the new ones. (optional) (default to false)
try:
# Add a list of new patterns
api_instance.bulk_update_patterns(patterns, replace=replace)
except ApiException as e:
print "Exception when calling SystemgrokApi->bulk_update_patterns: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
patterns | GrokPatternList | ||
replace | Object | Replace all patterns with the new ones. | [optional] [default to false] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_pattern(pattern)
Add a new named pattern
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
pattern = graylog.GrokPatternSummary() # GrokPatternSummary |
try:
# Add a new named pattern
api_instance.create_pattern(pattern)
except ApiException as e:
print "Exception when calling SystemgrokApi->create_pattern: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
pattern | GrokPatternSummary |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GrokPatternList list_grok_patterns()
Get all existing grok patterns
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
try:
# Get all existing grok patterns
api_response = api_instance.list_grok_patterns()
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemgrokApi->list_grok_patterns: %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]
GrokPattern list_pattern(pattern_id)
Get the existing grok pattern
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
pattern_id = graylog.Object() # Object |
try:
# Get the existing grok pattern
api_response = api_instance.list_pattern(pattern_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemgrokApi->list_pattern: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
pattern_id | 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]
remove_pattern()
Remove an existing pattern by id
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
try:
# Remove an existing pattern by id
api_instance.remove_pattern()
except ApiException as e:
print "Exception when calling SystemgrokApi->remove_pattern: %s\n" % e
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GrokPattern update_pattern(pattern_id, pattern)
Update an existing pattern
import time
import graylog
from graylog.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = graylog.SystemgrokApi()
pattern_id = graylog.Object() # Object |
pattern = graylog.GrokPatternSummary() # GrokPatternSummary |
try:
# Update an existing pattern
api_response = api_instance.update_pattern(pattern_id, pattern)
pprint(api_response)
except ApiException as e:
print "Exception when calling SystemgrokApi->update_pattern: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
pattern_id | Object | ||
pattern | GrokPatternSummary |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]