modulepackage
1.4.0
Repository: https://github.com/gprossliner/go-graylog.git
Documentation: pkg.go.dev
# README
go-graylog
Graylog API client and mock server for Golang and terraform provider for Graylog.
Supported APIs
Graylog provides very various APIs so we can't support all of them yet. Please check the following godoc's Client methods.
https://godoc.org/github.com/suzuki-shunsuke/go-graylog/client
Example - client and mock server
Mock Server CLI tool
Download a binary from the release page.
$ graylog-mock-server --help
graylog-mock-server - Run Graylog mock server.
USAGE:
graylog-mock-server [options]
VERSION:
0.1.0
OPTIONS:
--port value port number. If you don't set this option, a free port is assigned and the assigned port number is outputed to the console when the mock server runs.
--log-level value the log level of logrus which the mock server uses internally. (default: "info")
--data value data file path. When the server runs data of the file is loaded and when data of the server is changed data is saved at the file. If this option is not set, no data is loaded and saved.
--help, -h show help
--version, -v print the version
Terraform provider
Supported Graylog version
We use the graylog's official Docker Image for development.
The version is 2.5.0
.
Contribution
See CONTRIBUTING.md .
See also
- http://docs.graylog.org/en/2.5/pages/configuration/rest_api.html
- http://docs.graylog.org/en/2.5/pages/users_and_roles/permission_system.html
License
# Packages
Package client provides Graylog API client.
Package mockserver provides Graylog API mock server.
No description provided by the author
Package testutil provides utilities for test.
No description provided by the author
Package validator provides validators for graylog's create and update APIs.
# Functions
GetFuncGetInputAttrsByType returns the global GetInputAttrsByType function.
GetFuncGetUnknownTypeInputAttrs returns the global GetUnknownTypeInputAttrs function.
NewClosingRetentionStrategy returns a new closing RetentionStrategy.
NewDeletionRetentionStrategy returns a new deletion RetentionStrategy.
NewInputAttrsByType returns a new InputAttrs.
NewInputAWSCloudTrailAttrs is the constructor of InputAWSCloudTrailAttrs.
NewInputAWSCloudWatchLogsAttrs is the constructor of InputAWSCloudWatchLogsAttrs.
NewInputAWSFlowLogsAttrs is the constructor of InputAWSFlowLogsAttrs.
NewInputBeatsAttrs is the constructor of InputBeatsAttrs.
NewInputCEFAMQPAttrs is the constructor of InputCEFAMQPAttrs.
NewInputCEFKafkaAttrs is the constructor of InputCEFKafkaAttrs.
NewInputCEFTCPAttrs is the constructor of InputCEFTCPAttrs.
NewInputCEFUDPAttrs is the constructor of InputCEFUDPAttrs.
NewInputFakeHTTPMessageAttrs is the constructor of InputFakeHTTPMessageAttrs.
NewInputGELFAMQPAttrs is the constructor of InputGELFAMQPAttrs.
NewInputGELFHTTPAttrs is the constructor of InputGELFHTTPAttrs.
NewInputGELFKafkaAttrs is the constructor of InputGELFKafkaAttrs.
NewInputGELFTCPAttrs is the constructor of InputGELFTCPAttrs.
NewInputGELFUDPAttrs is the constructor of InputGELFUDPAttrs.
NewInputJSONPathAttrs is the constructor of InputJSONPathAttrs.
NewInputNetFlowUDPAttrs is the constructor of InputNetFlowUDPAttrs.
NewInputRawAMQPAttrs is the constructor of InputRawAMQPAttrs.
NewInputSyslogAMQPAttrs is the constructor of InputSyslogAMQPAttrs.
NewInputSyslogKafkaAttrs is the constructor of InputSyslogKafkaAttrs.
NewInputSyslogTCPAttrs is the constructor of InputSyslogTCPAttrs.
NewInputSyslogUDPAttrs is the constructor of InputSyslogUDPAttrs.
NewMessageCountRotationStrategy returns a new message count based RotationStrategy.
NewNoopRetentionStrategy returns a new noop RetentionStrategy.
NewSizeBasedRotationStrategy returns a new size based RotationStrategy.
NewTimeBasedRotationStrategy returns a new time based RotationStrategy.
SetFuncGetInputAttrsByType customizes NewInputAttrsByType's behavior.
SetFuncGetUnknownTypeInputAttrs customizes NewInputAttrsByType's behavior.
SetInputAttrs sets InputAttrs.
# Constants
ClosingRetentionStrategy is one of index set's retention strategies.
ClosingRetentionStrategyConfig is one of index set's retention strategy configs.
CreationDateFormat is the date format used at graylog API's request and response body.
DeletionRetentionStrategy is one of index set's retention strategies.
DeletionRetentionStrategyConfig is one of index set's retention strategy configs.
EmailAlarmCallbackType is a type of EmailAlarmCallback.
HTTPAlarmCallbackType is a type of HTTPAlarmCallback.
InputTypeAWSCloudTrail is one of input types.
InputTypeAWSCloudWatchLogs is one of input types.
InputTypeAWSFlowLogs is one of input types.
InputTypeBeats is one of input types.
InputTypeCEFAMQP is one of input types.
InputTypeCEFKafka is one of input types.
InputTypeCEFTCP is one of input types.
InputTypeCEFUDP is one of input types.
InputTypeFakeHTTPMessage is one of input types.
InputTypeGELFAMQP is one of input types.
InputTypeGELFHTTP is one of input types.
InputTypeGELFKafka is one of input types.
InputTypeGELFTCP is one of input types.
InputTypeGELFUDP is one of input types.
InputTypeJSONPath is one of input types.
InputTypeNetFlowUDP is one of input types.
InputTypeRawAMQP is one of input types.
InputTypeSyslogAMQP is one of input types.
InputTypeSyslogKafka is one of input types.
InputTypeSyslogTCP is one of input types.
InputTypeSyslogUDP is one of input types.
MessageCountRotationStrategy is one of index set's rotation strategies.
MessageCountRotationStrategyConfig is one of index set's rotation strategy configs.
NoopRetentionStrategy is one of index set's retention strategies.
NoopRetentionStrategyConfig is one of index set's retention strategy configs.
SizeBasedRotationStrategy is one of index set's rotation strategies.
SizeBasedRotationStrategyConfig is one of index set's rotation strategy configs.
SlackAlarmCallbackType is a type of SlackAlarmCallback.
TimeBasedRotationStrategy is one of index set's rotation strategies.
TimeBasedRotationStrategyConfig is one of index set's rotation strategy configs.
Version is the go-graylog's version.
# Variables
InputAttrsBoolFieldSet is the set of bool fields of all type of input attributes.
InputAttrsIntFieldSet is the set of int fields of all type of input attributes.
InputAttrsStrFieldSet is the set of string fields of all type of input attributes.
# Structs
No description provided by the author
No description provided by the author
Alert represents an Alert.
AlertCondition represents an Alert Condition.
AlertConditionsBody represents Get Alert Conditions API's response body.
AlertReceivers represents alert receivers.
AlertsBody represents Get Alerts API's response body.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CollectorConfigurationsBody represents Get Collector Configurations API's response body.
No description provided by the author
Dashboard represents a Graylog's Dashboard.
DashboardsBody represents Get Dashboards API's response body.
No description provided by the author
FieldAggregationAlertConditionParameters represents Field Aggregation Alert Condition's parameters.
FieldContentAlertConditionParameters represents Field Content Alert Condition's parameters.
No description provided by the author
GeneralAlertConditionParameters is a general third party's alert condition parameters.
No description provided by the author
IndexSet represents a Graylog's Index Set.
IndexSetsBody represents Get Index Sets API's response body.
IndexSetStats represents a Graylog's Index Set Stats.
IndexSetUpdateParams represents a Graylog's Index Set Update API's parameter.
Input represents Graylog Input.
InputAWSCloudTrailAttrs represents aws cloud trail Input's attributes.
InputAWSCloudWatchLogsAttrs represents AWS logs Input's attributes.
InputAWSFlowLogsAttrs represents AWS flow logs Input's attributes.
InputBeatsAttrs represents Beats Input's attributes.
InputCEFAMQPAttrs represents CEF AMQP Input's attributes.
InputCEFKafkaAttrs represents CEF Kafka Input's attributes.
InputCEFTCPAttrs represents CEF TCP Input's attributes.
InputCEFUDPAttrs represents CEF UDP Input's attributes.
InputData represents data of Input.
InputFakeHTTPMessageAttrs represents fake HTTP message Input's attributes.
InputGELFAMQPAttrs represents GELF AMQP Input's attributes.
InputGELFHTTPAttrs represents GELF HTTP Input's attributes.
InputGELFKafkaAttrs represents GELF Kafka Input's attributes.
InputGELFTCPAttrs represents GELF TCP Input's attributes.
InputGELFUDPAttrs represents GELF UDP Input's attributes.
InputJSONPathAttrs represents JSON path Input's attributes.
InputNetFlowUDPAttrs represents net flow UDP Input's attributes.
InputRawAMQPAttrs represents raw AMQP Input's attributes.
InputsBody represents Get Inputs API's response body.
InputSyslogAMQPAttrs represents SyslogAMQP Input's attributes.
InputSyslogKafkaAttrs represents SyslogKafka Input's attributes.
InputSyslogTCPAttrs represents SyslogTCP Input's attributes.
InputSyslogUDPAttrs represents SyslogUDP Input's attributes.
InputUnknownAttrs represents unknown type's Input Attrs.
InputUpdateParams represents Graylog Input update API's parameter.
InputUpdateParamsData represents InputUpdateParams's data.
LDAPSetting represents a ldap settings.
MessageCountAlertConditionParameters represents Field Aggregation Alert Condition's parameters.
Output represents an output.
PipelineRule represents a Graylog's Pipeline Rule.
Preferences represents user's preferences.
RetentionStrategy represents a Graylog's Index Set Retention Strategy.
Role represents a role.
RolesBody represents Get Roles API's response body.
RoleUpdateParams represents Update Role API's parameters.
RotationStrategy represents a Graylog's Index Set Rotation Strategy.
No description provided by the author
Startpage represents a user's startpage.
Stream represents a steram.
StreamRule represents a stream rule.
StreamRulesBody represents Get stream rules API's response body.
StreamRuleUpdateParams represents Update Stream API's paramteres.
StreamsBody represents Get Streams API's response body.
StreamUpdateParams represents a steram update params.
Timerange represents a timerange.
User represents a user.
UsersBody represents Get Users API's response body.
UserUpdateParams represents a user update API's parameter.
Widget represents a Graylog's Dashboard Widget.
WidgetConfig represents a Graylog's Dashboard Widget configuration.
# Interfaces
No description provided by the author
AlertConditionParameters represents Alert Condition's parameters.
No description provided by the author
No description provided by the author
InputAttrs represents Input Attributes.
# Type aliases
GetInputAttrsByTypeIntf returns a given type InputAttrs.
GetUnknownTypeInputAttrsIntf returns an unknown type InputAttrs.
NewInputAttrs is the constructor of InputAttrs.