The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Graylog::API - API Client for Net::Graylog::API

VERSION

version 0.7

SYNOPSIS

  use Net::Graylog::API ;
 
  my $api = Net::Graylog::API->new( url => 'http://server:12345' ) ;

  $api->api_command( message => 'testing', 'debug') ;

DESCRIPTION

This module has been autogenerated against a Swagger API, hopefully the author has fixed up the documentation

Currently this module is only using Basic auth over HTTP, not yet got into the complexity of anything else.

NAME

Net::Graylog::API - API Client for Net::Graylog::API

VERSION

version 0.7

NAME

Net::Graylog::API

AUTHOR

autogenerated by create_swagger_api, Which was created by kevin Mulholland, moodfarm@cpan.org

VERSIONS

v0.1

Notes

Currently I am unsure if the PUT/POST actions work

Due to issues with Graylog2 documentation, I cannot test that any of the methods that use post/put actions will work, so lets assume for now that they do not

Todo

Investigate HTTP::Async instead of :Furl as it will not block, so we can wait for the response to be received, rather than the timeout to lapse

Data Models

SearchResponse

built_query [String]
error [Object]
  * begin_column [Integer]
  * begin_line [Integer]
  * end_column [Integer]
  * end_line [Integer]
fields [Array]
  * type [String]
generic_error [Object]
  * exception_name [String]
  * message [String]
messages [Array]
  * properties [Object]
    * index [String]
    * message [Object]
      * additional_properties [Any]
query [String]
time [Integer]
total_results [Integer]
used_indices [Array]
  * type [String]

ReaderPermissionResponse

permissions [Array]
  * type [String]

LdapTestConfigResponse

connected [Boolean]
entry [Object]
  * additional_properties [String]
exception [String]
login_authenticated [Boolean]
system_authenticated [Boolean]

LdapTestConfigRequest

active_directory [Boolean]
ldap_uri [String]
password [String]
principal [String]
search_base [String]
search_pattern [String]
system_password [String]
system_username [String]
test_connect_only [Boolean]
trust_all_certificates [Boolean]
use_start_tls [Boolean]

SessionCreateRequest

host [String]
password [String]
username [String]

Session

session_id [String]
valid_until [String]

Token

last_access [String]
name [String]
token [String]

TokenList

tokens [Array]
  * properties [Object]
    * last_access [String]
    * name [String]
    * token [String]

Public Methods

Any method may die, you may need to catch these.

new

Create a new instance of the api connection

    my $api = Net::Graylog::API->new( url => 'http://server:12345') ;

Parameters url the url of the server API, of the form http://server:12345 timeout, can be a float, default 0.01, Furl seems to wait until the timeout occurs before giving a response, which really cuts into the speed of sending, you may want to make this bigger for non-local servers, ie 1s

Alerts

Manage stream alerts

alerts_list

Get the 100 most recent alarms of this stream.

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

Returns: Normal Furl::Response, with decoded JSON in json element

alerts_check_conditions

Check for triggered alert conditions of this streams. Results cached for 30 seconds.

Required parameters

  • streamId [String] The ID of the stream to check.

Returns: Normal Furl::Response, with decoded JSON in json element

alerts_list_conditions

Get all alert conditions of this stream

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

Returns: Normal Furl::Response, with decoded JSON in json element

alerts_create

Create a alert condition

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

delete_alerts_list

Delete an alert condition

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

  • conditionId [String] The stream id this new alert condition belongs to.

Returns: Normal Furl::Response, with decoded JSON in json element

alerts_add_receiver

Add an alert receiver

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

  • entity [String] Name/ID of user or email address to add as alert receiver.

  • type [String] Type: users or emails

Returns: Normal Furl::Response, possible data in content

alerts_remove_receiver

Remove an alert receiver

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

  • entity [String] Name/ID of user or email address to remove from alert receivers.

  • type [String] Type: users or emails

Returns: Normal Furl::Response, possible data in content

alerts_send_dummy_alert

Send a test mail for a given stream

Required parameters

  • streamId [String] The stream id this new alert condition belongs to.

Returns: Normal Furl::Response, possible data in content

Counts

Message counts

counts_total

Total number of messages in all your indices.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Dashboards

Manage dashboards

dashboards_list

Get a list of all dashboards and all configurations of their widgets.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

dashboards_create

Create a dashboard

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_get

Get a single dashboards and all configurations of its widgets.

Required parameters

  • dashboardId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

dashboards_delete

Delete a dashboard and all its widgets

Required parameters

  • dashboardId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_update

Update the settings of a dashboard.

Required parameters

  • JSON body [String]

  • dashboardId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_set_positions

Update/set the positions of dashboard widgets.

Required parameters

  • JSON body [String]

  • dashboardId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_add_widget

Add a widget to a dashboard

Required parameters

  • JSON body [String]

  • dashboardId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_remove

Delete a widget

Required parameters

  • dashboardId [String]

  • widgetId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_update_cache_time

Update cache time of a widget

Required parameters

  • JSON body [String]

  • dashboardId [String]

  • widgetId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_update_description

Update description of a widget

Required parameters

  • JSON body [String]

  • dashboardId [String]

  • widgetId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

dashboards_widget_value

Get a single widget value.

Required parameters

  • dashboardId [String]

  • widgetId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

Documentation

Documentation of this API in JSON format.

documentation_overview

Get API documentation

Returns: Normal Furl::Response, with decoded JSON in json element

documentation_route

Get detailed API documentation of a single resource

Required parameters

  • route [String] Route to fetch. For example /system

Returns: Normal Furl::Response, with decoded JSON in json element

Extractors

Extractors of an input

extractors_list

List all extractors of an input

Required parameters

  • inputId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

extractors_create

Add an extractor to an input

Required parameters

  • JSON body [String]

  • inputId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

extractors_terminate

Delete an extractor

Required parameters

  • inputId [String]

  • extractorId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

Indexer/Cluster

Indexer cluster information

indexer_cluster_cluster_health

Get cluster and shard health overview

Returns: [String] Normal Furl::Response, with decoded JSON in json element

indexer_cluster_cluster_name

Get the cluster name

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Indexer/Failures

Indexer failures

indexer_failures_single

Get a list of failed index operations.

Required parameters

  • limit [Integer] Limit

  • offset [Integer] Offset

Returns: Normal Furl::Response, with decoded JSON in json element

indexer_failures_count

Total count of failed index operations since the given date.

Optional parameters

  • since [String] ISO8601 date

Returns: Normal Furl::Response, with decoded JSON in json element

Indexer/Indices

Index informations

indexer_indices_closed

Get a list of closed indices that can be reopened.

Returns: Normal Furl::Response, with decoded JSON in json element

indexer_indices_single

Get information of an index and its shards.

Optional parameters

  • index [String]

Returns: Normal Furl::Response, with decoded JSON in json element

indexer_indices_delete

Delete an index. This will also trigger an index ranges rebuild job.

Optional parameters

  • index [String]

Returns: Normal Furl::Response, with decoded JSON in json element

indexer_indices_close

Close an index. This will also trigger an index ranges rebuild job.

Optional parameters

  • index [String]

Returns: Normal Furl::Response, with decoded JSON in json element

indexer_indices_reopen

Reopen a closed index. This will also trigger an index ranges rebuild job.

Optional parameters

  • index [String]

Returns: Normal Furl::Response, with decoded JSON in json element

Messages

Single messages

messages_analyze

Analyze a message string

Note: Returns what tokens/terms a message string (message or full_message) is split to.

Required parameters

  • index [String] The index the message containing the string is stored in.

  • string [String] The string to analyze.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Get a single message.

Required parameters

  • index [String] The index this message is stored in.

  • messageId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Search/Absolute

Message search

search_absolute_search_absolute

Message search with absolute timerange.

Note: Search for messages using an absolute timerange, specified as from/to with format yyyy-MM-ddTHH:mm:ss.SSSZ (e.g. 2014-01-23T15:34:49.000Z) or yyyy-MM-dd HH-mm-ss.

Required parameters

  • query [String] Query (Lucene syntax)

  • from [String] Timerange start. See description for date format

  • to [String] Timerange end. See description for date format

Optional parameters

  • limit [Integer] Maximum number of messages to return.

  • offset [Integer] Offset

  • filter [String] Filter

  • sort [String] Sorting (field:asc / field:desc)

Returns: ["SearchResponse"] Normal Furl::Response, with decoded JSON in json element

search_absolute_field_histogram_absolute

Field value histogram of a query using an absolute timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • field [String] Field of whose values to get the histogram of

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • from [String] Timerange start. See search method description for date format

  • to [String] Timerange end. See search method description for date format

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_absolute_histogram_absolute

Datetime histogram of a query using an absolute timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • from [String] Timerange start. See search method description for date format

  • to [String] Timerange end. See search method description for date format

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_absolute_stats_absolute

Field statistics for a query using an absolute timerange.

Note: Returns statistics like min/max or standard deviation of numeric fields over the whole query result set.

Required parameters

  • field [String] Message field of numeric type to return statistics for

  • query [String] Query (Lucene syntax)

  • from [String] Timerange start. See search method description for date format

  • to [String] Timerange end. See search method description for date format

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_absolute_terms_absolute

Most common field terms of a query using an absolute timerange.

Required parameters

  • field [String] Message field of to return terms of

  • query [String] Query (Lucene syntax)

  • from [String] Timerange start. See search method description for date format

  • to [String] Timerange end. See search method description for date format

Optional parameters

  • size [Integer] Maximum number of terms to return

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Search/Keyword

Message search

search_keyword_search_keyword

Message search with keyword as timerange.

Note: Search for messages in a timerange defined by a keyword like "yesterday" or "2 weeks ago to wednesday".

Required parameters

  • query [String] Query (Lucene syntax)

  • keyword [String] Range keyword

Optional parameters

  • limit [Integer] Maximum number of messages to return.

  • offset [Integer] Offset

  • filter [String] Filter

  • sort [String] Sorting (field:asc / field:desc)

Returns: ["SearchResponse"] Normal Furl::Response, with decoded JSON in json element

search_keyword_field_histogram_keyword

Datetime histogram of a query using keyword timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • field [String] Field of whose values to get the histogram of

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • keyword [String] Range keyword

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_keyword_histogram_keyword

Datetime histogram of a query using keyword timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • keyword [String] Range keyword

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_keyword_stats_keyword

Field statistics for a query using a keyword timerange.

Note: Returns statistics like min/max or standard deviation of numeric fields over the whole query result set.

Required parameters

  • field [String] Message field of numeric type to return statistics for

  • query [String] Query (Lucene syntax)

  • keyword [String] Range keyword

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_keyword_terms_keyword

Most common field terms of a query using a keyword timerange.

Required parameters

  • field [String] Message field of to return terms of

  • query [String] Query (Lucene syntax)

  • keyword [String] Range keyword

Optional parameters

  • size [Integer] Maximum number of terms to return

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Search/Relative

Message search

search_relative_search_relative

Message search with relative timerange.

Note: Search for messages in a relative timerange, specified as seconds from now. Example: 300 means search from 5 minutes ago to now.

Required parameters

  • query [String] Query (Lucene syntax)

  • range [Integer] Relative timeframe to search in. See method description.

Optional parameters

  • limit [Integer] Maximum number of messages to return.

  • offset [Integer] Offset

  • filter [String] Filter

  • sort [String] Sorting (field:asc / field:desc)

Returns: ["SearchResponse"] Normal Furl::Response, with decoded JSON in json element

search_relative_field_histogram_relative

Field value histogram of a query using a relative timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • field [String] Field of whose values to get the histogram of

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • range [Integer] Relative timeframe to search in. See search method description.

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_relative_histogram_relative

Datetime histogram of a query using a relative timerange.

Required parameters

  • query [String] Query (Lucene syntax)

  • interval [String] Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)

  • range [Integer] Relative timeframe to search in. See search method description.

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_relative_stats_relative

Field statistics for a query using a relative timerange.

Note: Returns statistics like min/max or standard deviation of numeric fields over the whole query result set.

Required parameters

  • field [String] Message field of numeric type to return statistics for

  • query [String] Query (Lucene syntax)

  • range [Integer] Relative timeframe to search in. See search method description.

Optional parameters

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_relative_terms_relative

Most common field terms of a query using a relative timerange.

Required parameters

  • field [String] Message field of to return terms of

  • query [String] Query (Lucene syntax)

  • range [Integer] Relative timeframe to search in. See search method description.

Optional parameters

  • size [Integer] Maximum number of terms to return

  • filter [String] Filter

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Search/Saved

Saved searches

search_saved_list

Get a list of all saved searches

Returns: [String] Normal Furl::Response, with decoded JSON in json element

search_saved_create

Create a new saved search

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

search_saved_get

Get a single saved search

Required parameters

  • searchId [String]

Returns: [String] Normal Furl::Response, possible data in content

search_saved_delete

Delete a saved search

Required parameters

  • searchId [String]

Returns: Normal Furl::Response, possible data in content

Sources

Listing message sources (e.g. hosts sending logs)

sources_list

Get a list of all sources (not more than 5000) that have messages in the current indices. The result is cached for 10 seconds.

Note: Range: The parameter is in seconds relative to the current time. 86400 means 'in the last day',0 is special and means 'across all indices'

Required parameters

  • range [Integer] Relative timeframe to search in. See method description.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

StaticFields

Static fields of an input

static_fields_create

Add a static field to an input

Required parameters

  • JSON body [String]

  • inputId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

static_fields_delete

Remove static field of an input

Required parameters

  • Key [String]

  • inputId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

StreamRules

Manage stream rules

stream_rules_get

Get a list of all stream rules

Required parameters

  • streamid [String] The id of the stream whose stream rules we want.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

stream_rules_create

Create a stream rule

Required parameters

  • streamid [String] The stream id this new rule belongs to.

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

get_stream_rules_get

Get a single stream rules

Required parameters

  • streamid [String] The id of the stream whose stream rule we want.

  • streamRuleId [String] The stream rule id we are getting

Returns: Normal Furl::Response, with decoded JSON in json element

stream_rules_delete

Delete a stream rule

Required parameters

  • streamid [String] The stream id this new rule belongs to.

  • streamRuleId [String]

Returns: Normal Furl::Response, possible data in content

stream_rules_update

Update a stream rule

Required parameters

  • streamid [String] The stream id this rule belongs to.

  • streamRuleId [String] The stream rule id we are updating

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

Streams

Manage streams

streams_get

Get a list of all streams

Returns: [String] Normal Furl::Response, with decoded JSON in json element

streams_create

Create a stream

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

streams_get_enabled

Get a list of all streams

Returns: [String] Normal Furl::Response, with decoded JSON in json element

streams_stream_throughput

Current throughput of all visible streams on this node in messages per second

Returns: Normal Furl::Response, with decoded JSON in json element

get_streams_get

Get a single stream

Required parameters

  • streamId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

streams_delete

Delete a stream

Required parameters

  • streamId [String]

Returns: Normal Furl::Response, possible data in content

streams_update

Update a stream

Required parameters

  • JSON body [String]

  • streamId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

streams_clone_stream

Clone a stream

Required parameters

  • streamId [String]

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

streams_pause

Pause a stream

Required parameters

  • streamId [String]

Returns: Normal Furl::Response, possible data in content

streams_resume

Resume a stream

Required parameters

  • streamId [String]

Returns: Normal Furl::Response, possible data in content

streams_test_match

Test matching of a stream against a supplied message

Required parameters

  • streamId [String]

  • JSON body [String]

Returns: [String] Normal Furl::Response, possible data in content

streams_one_stream_throughput

Current throughput of this stream on this node in messages per second

Required parameters

  • streamId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

System

System information of this node.

system

Get system overview

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_fields

Get list of message fields that exist

Note: This operation is comparably fast because it reads directly from the indexer mapping.

Optional parameters

  • limit [Integer] Maximum number of fields to return. Set to 0 for all fields.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_jvm

Get JVM information

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_permissions

Get all available user permissions.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_reader_permissions

Get the initial permissions assigned to a reader account

Required parameters

  • username [String]

Returns: ["ReaderPermissionResponse"] Normal Furl::Response, with decoded JSON in json element

system_pause_processing

Pauses message processing

Note: Inputs that are able to reject or requeue messages will do so, others will buffer messages in memory. Keep an eye on the heap space utilization while message processing is paused.

Returns: Normal Furl::Response, possible data in content

system_resume_processing

Resume message processing

Returns: Normal Furl::Response, possible data in content

system_threaddump

Get a thread dump

Returns: [String] Normal Furl::Response, possible plain text response in content

System/Buffers

Buffer information of this node.

system_buffers_utilization

Get current utilization of buffers and caches of this node.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

System/Cluster

Node discovery

system_cluster_node

Information about this node.

Note: This is returning information of this node in context to its state in the cluster. Use the system API of the node itself to get system information.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_cluster_nodes

List all active nodes in this cluster.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

get_system_cluster_node

Information about a node.

Note: This is returning information of a node in context to its state in the cluster. Use the system API of the node itself to get system information.

Required parameters

  • nodeId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

System/Deflector

Index deflector management

system_deflector_deflector

Get current deflector status

Returns: Normal Furl::Response, with decoded JSON in json element

system_deflector_config

Get deflector configuration. Only available on master nodes.

Returns: Normal Furl::Response, with decoded JSON in json element

system_deflector_cycle

Cycle deflector to new/next index

Returns: Normal Furl::Response, possible data in content

System/IndexRanges

Index timeranges

system_index_ranges_list

Get a list of all index ranges

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_index_ranges_rebuild

Rebuild/sync index range information.

Note: This triggers a systemjob that scans every index and stores meta information about what indices contain messages in what timeranges. It atomically overwrites already existing meta information.

Returns: Normal Furl::Response, with decoded JSON in json element

System/Inputs

Message inputs of this node

system_inputs_list

Get all inputs of this node

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_inputs_create

Launch input on this node

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

system_inputs_types

Get all available input types of this node

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_inputs_info

Get information about a single input type

Required parameters

  • inputType [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_inputs_single

Get information of a single input on this node

Required parameters

  • inputId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_inputs_terminate

Terminate input on this node

Required parameters

  • inputId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

system_inputs_launch_existing

Launch existing input on this node

Required parameters

  • inputId [String]

Returns: Normal Furl::Response, with decoded JSON in json element

System/Jobs

Systemjobs

system_jobs_trigger

Trigger new job

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

system_jobs_list

List currently running jobs

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_jobs_get

Get information of a specific currently running job

Required parameters

  • jobId [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

System/LDAP

LDAP settings

system_l_d_a_p_get_ldap_settings

Get the LDAP configuration if it is configured

Returns: Normal Furl::Response, with decoded JSON in json element

system_l_d_a_p_update_ldap_settings

Update the LDAP configuration

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, possible data in content

system_l_d_a_p_delete_ldap_settings

Remove the LDAP configuration

Returns: Normal Furl::Response, possible data in content

system_l_d_a_p_test_ldap_configuration

Test LDAP Configuration

Required parameters

  • Configuration to test [LdapTestConfigRequest]

Returns: ["LdapTestConfigResponse"] Normal Furl::Response, with decoded JSON in json element

System/Loggers

Internal Graylog2 loggers

system_loggers_loggers

List all loggers and their current levels

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_loggers_subsytems

List all logger subsystems and their current levels

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_loggers_set_subsystem_logger_level

Set the loglevel of a whole subsystem

Note: Provided level is falling back to DEBUG if it does not exist

Required parameters

  • subsystem [String]

  • level [String]

Returns: Normal Furl::Response, possible data in content

system_loggers_set_single_logger_level

Set the loglevel of a single logger

Note: Provided level is falling back to DEBUG if it does not exist

Required parameters

  • loggerName [String]

  • level [String]

Returns: Normal Furl::Response, possible data in content

System/Messages

Internal Graylog2 messages

system_messages_all

Get internal Graylog2 system messages

Optional parameters

  • page [Integer] Page

Returns: [String] Normal Furl::Response, with decoded JSON in json element

System/Metrics

Internal Graylog2 metrics

system_metrics_metrics

Get all metrics

Note: Note that this might return a huge result set.

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_metrics_metric_names

Get all metrics keys/names

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_metrics_by_namespace

Get all metrics of a namespace

Required parameters

  • namespace [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_metrics_single_metric

Get a single metric

Required parameters

  • metricName [String]

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_metrics_historic_single_metric

Get history of a single metric

Note: The maximum retention time is currently only 5 minutes.

Required parameters

  • metricName [String]

Optional parameters

  • after [Long] Only values for after this UTC timestamp (1970 epoch)

Returns: [String] Normal Furl::Response, possible data in content

System/Notifications

Notifications generated by the system

system_notifications_list_notifications

Get all active notifications

Returns: [String] Normal Furl::Response, with decoded JSON in json element

system_notifications_delete_notification

Delete a notification

Optional parameters

  • notificationType [String]

Returns: Normal Furl::Response, with decoded JSON in json element

System/Radios

Management of graylog2-radio nodes.

system_radios_radios

List all active radios in this cluster.

Returns: [String] Normal Furl::Response, possible data in content

system_radios_radio

Information about a radio.

Note: This is returning information of a radio in context to its state in the cluster. Use the system API of the node itself to get system information.

Required parameters

  • radioId [String]

Returns: [String] Normal Furl::Response, possible data in content

system_radios_register_input

Register input of a radio.

Note: Radio inputs register their own inputs here for persistence after they successfully launched it.

Required parameters

  • JSON body [String]

  • radioId [String]

Returns: Normal Furl::Response, possible data in content

system_radios_persisted_inputs

Persisted inputs of a radio.

Note: This is returning the configured persisted inputs of a radio node. This is *not* returning the actually running inputs on a radio node. Radio nodes use this resource to get their configured inputs on startup.

Required parameters

  • radioId [String]

Returns: [String] Normal Furl::Response, possible data in content

system_radios_unregister_input

Unregister input of a radio.

Note: Radios unregister their inputs when they are stopped/terminated on the radio.

Required parameters

  • radioId [String]

  • inputId [String]

Returns: Normal Furl::Response, possible data in content

system_radios_ping

Ping - Accepts pings of graylog2-radio nodes.

Note: Every graylog2-radio node is regularly pinging to announce that it is active.

Required parameters

  • JSON body [String]

  • radioId [String]

Returns: Normal Furl::Response, possible data in content

System/Sessions

Login for interactive user sessions

system_sessions_new_session

Create a new session

Note: This request creates a new session for a user or reactivates an existing session: the equivalent of logging in.

Required parameters

  • Login request [SessionCreateRequest] Username and credentials

Returns: [Session] Normal Furl::Response, possible data in content

system_sessions_terminate_session

Terminate an existing session

Note: Destroys the session with the given ID: the equivalent of logging out.

Required parameters

  • sessionId [String]

Returns: Normal Furl::Response, possible data in content

System/Throughput

Message throughput of this node

system_throughput_total

Current throughput of this node in messages per second

Returns: [String] Normal Furl::Response, with decoded JSON in json element

Users

User accounts

users_list_users

List all users

Note: The permissions assigned to the users are always included.

Returns: Normal Furl::Response, with decoded JSON in json element

users_create

Create a new user account.

Required parameters

  • JSON body [String]

Returns: Normal Furl::Response, with decoded JSON in json element

users_change_user

Modify user details.

Required parameters

  • username [String] The name of the user to modify.

Returns: Normal Furl::Response, with decoded JSON in json element

users_delete_user

Removes a user account.

Required parameters

  • username [String] The name of the user to delete.

Returns: Normal Furl::Response, with decoded JSON in json element

users_get

Get user details

Note: The user's permissions are only included if a user asks for his own account or for users with the necessary permissions to edit permissions.

Required parameters

  • username [String] The username to return information for.

Returns: Normal Furl::Response, with decoded JSON in json element

users_change_password

Update the password for a user.

Required parameters

  • username [String] The name of the user whose password to change.

  • JSON body [String] The hashed old and new passwords.

Returns: Normal Furl::Response, with decoded JSON in json element

users_edit_permissions

Update a user's permission set.

Required parameters

  • username [String] The name of the user to modify.

  • JSON body [String] The list of permissions to assign to the user.

Returns: Normal Furl::Response, with decoded JSON in json element

users_delete_permissions

Revoke all permissions for a user without deleting the account.

Required parameters

  • username [String] The name of the user to modify.

Returns: Normal Furl::Response, with decoded JSON in json element

users_list_tokens

Retrieves the list of access tokens for a user

Required parameters

  • username [String]

Returns: ["TokenList"] Normal Furl::Response, with decoded JSON in json element

users_generate_new_token

Generates a new access token for a user

Required parameters

  • username [String]

  • name [String] Descriptive name for this token (e.g. 'cronjob')

Returns: [Token] Normal Furl::Response, with decoded JSON in json element

users_revoke_token

Removes a token for a user

Required parameters

  • username [String]

  • access token [String]

Returns: Normal Furl::Response, with decoded JSON in json element

AUTHOR

Kevin Mulholland <moodfarm@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Kevin Mulholland.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

AUTHOR

Kevin Mulholland <moodfarm@cpan.org> James Lavoy <jalavoy@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kevin Mulholland.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.