For other versions, see theVersioned plugin docs.
For plugins not bundled by default, it is easy to install by running bin/logstash-plugin install logstash-output-nagios_nsca
. See Working with plugins for more details.
For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github.For the list of Elastic supported plugins, please consult the Elastic Support Matrix.
The nagios_nsca output is used for sending passive check results to Nagiosthrough the NSCA protocol.
This is useful if your Nagios server is not the same as the source host fromwhere you want to send logs or alerts. If you only have one server, thisoutput is probably overkill # for you, take a look at the nagios outputinstead.
Here is a sample config using the nagios_nsca output:
output { nagios_nsca { # specify the hostname or ip of your nagios server host => "nagios.example.com"
# specify the port to connect to port => 5667 }}
This plugin supports the following configuration options plus the Common Options described later.
Setting | Input type | Required |
---|---|---|
No |
||
No |
||
No |
||
No |
||
Yes |
||
No |
||
No |
||
a valid filesystem path |
No |
Also see Common Options for a list of options supported by alloutput plugins.
"localhost"
The nagios host or IP to send logs to. It should have a NSCA daemon running.
"%{@timestamp} %{host}: %{message}"
The format to use when writing events to nagios. This valuesupports any string and can include %{name}
and other dynamicstrings.
"%{host}"
The nagios host you want to submit a passive check result to. Thisparameter accepts interpolation, e.g. you can use @source_host
or otherlogstash internal variables.
"LOGSTASH"
The nagios service you want to submit a passive check result to. Thisparameter accepts interpolation, e.g. you can use @source_host
or otherlogstash internal variables.
The status to send to nagios. Should be 0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN
5667
The port where the NSCA daemon on the nagios host listens.
"/usr/sbin/send_nsca"
The path to the send_nsca binary on the local host.
The path to the send_nsca config file on the local host.Leave blank if you don’t want to provide a config file.
The following configuration options are supported by all output plugins:
"plain"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
true
Disable or enable metric logging for this specific plugin instance.By default we record all the metrics we can, but you can disable metrics collectionfor a specific plugin.
Add a unique ID
to the plugin configuration. If no ID is specified, Logstash will generate one.It is strongly recommended to set this ID in your configuration. This is particularly usefulwhen you have two or more plugins of the same type. For example, if you have 2 nagios_nsca outputs.Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { nagios_nsca { id => "my_plugin_id" }}