<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I configure Splunk for Nagios to ingest nagios events from syslog in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80139#M5098</link>
    <description>&lt;P&gt;You could stop nagios writing to syslog in nagios.conf on your nagios server.&lt;BR /&gt;
Reduces disk I/O on your monitoing server to &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 May 2014 08:10:36 GMT</pubDate>
    <dc:creator>avdheuvel</dc:creator>
    <dc:date>2014-05-07T08:10:36Z</dc:date>
    <item>
      <title>How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80134#M5093</link>
      <description>&lt;P&gt;Duplicate events are being captured by syslog (and therefore Splunk too). For example, nagios events are being written to the following two files on the central syslog server :-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user.log
syslog
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk ingests these log files into the default index called "main" with a sourcetype of "syslog".&lt;/P&gt;

&lt;P&gt;How do I configure Splunk to discard duplicate events and ingest the nagios events into the "nagios" index with a sourcetype of "nagios"?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 00:24:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80134#M5093</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2012-02-28T00:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80135#M5094</link>
      <description>&lt;P&gt;You can configure Splunk to drop any nagios events that are read from the syslog file and only index the nagios events from user.log. You can also route the nagios events to a Splunk index called "nagios" with a sourcetype of "nagios".&lt;/P&gt;

&lt;P&gt;Simply update props.conf and transforms.conf on your Splunk indexer as below :-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/etc/system/local/props.conf

[source::/.../user.log]
TRANSFORMS-set_nagios_index = set_nagios_index
TRANSFORMS-set_nagios_sourcetype = set_nagios_sourcetype

[source::/.../syslog]
TRANSFORMS-set_nagios_null = set_nagios_null


/opt/splunk/etc/system/local/transforms.conf

[set_nagios_index]
REGEX = \snagios(\d+|):\s
DEST_KEY = _MetaData:Index
FORMAT = nagios

[set_nagios_sourcetype]
REGEX = \snagios(\d+|):\s
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::nagios

[set_nagios_null]
REGEX = \snagios(\d+|):\s
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Change the nagiosevent field extraction to work with your event data, just update the following configuration file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/apps/SplunkForNagios/default/props.conf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace the following field extraction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-nagiosevent = \[\d+] (?P&amp;lt;nagiosevent&amp;gt;[^:]*)(?=)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with this field extraction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-nagiosevent = \snagios(\d+|):\s(?P&amp;lt;nagiosevent&amp;gt;[^:]*)(?=)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Restart Splunk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;You should now be able to search for your nagios events in Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nagios
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Luke &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 00:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80135#M5094</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2012-02-28T00:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80136#M5095</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have a slightly different configuration: I try to capture nagios events from syslog events (sent by a forwarder), but I don't have anything in my index or sourcetype "nagios".&lt;BR /&gt;
The host is determined correctly into syslog, so I should be able to filter on it.&lt;/P&gt;

&lt;P&gt;In my props.conf:&lt;BR /&gt;
[host::&lt;NAGIOS-HOST&gt;]&lt;BR /&gt;
TRANSFORMS-set_nagios_index = set_nagios_index&lt;BR /&gt;
TRANSFORMS-set_nagios_sourcetype = set_nagios_sourcetype&lt;/NAGIOS-HOST&gt;&lt;/P&gt;

&lt;P&gt;In my transforms.conf:&lt;BR /&gt;
[set_nagios_index]&lt;BR /&gt;
REGEX = \snagios(\d+|):\s&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = nagios&lt;/P&gt;

&lt;P&gt;[set_nagios_sourcetype]&lt;BR /&gt;
REGEX = \snagios(\d+|):\s&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
FORMAT = sourcetype::nagios&lt;/P&gt;

&lt;P&gt;Any thoughts ?&lt;BR /&gt;
Thanks you in advance,&lt;BR /&gt;
Arthur&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80136#M5095</guid>
      <dc:creator>aandrieu</dc:creator>
      <dc:date>2020-09-28T14:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80137#M5096</link>
      <description>&lt;P&gt;Hi Arthur &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;you can use a modified regex in a transform that applies the nagios sourcetype to events that come from your nagios host.&lt;/P&gt;

&lt;P&gt;Please refer to the example here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides#Example:_Assign_a_source_type_to_events_from_a_single_input_but_different_hosts"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides#Example:_Assign_a_source_type_to_events_from_a_single_input_but_different_hosts&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;All the best,&lt;/P&gt;

&lt;P&gt;Luke &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2013 23:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80137#M5096</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2013-08-20T23:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80138#M5097</link>
      <description>&lt;P&gt;Hi Luke &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank you for your quick answer!&lt;BR /&gt;
It didn't work because I receive these events from a forwarder: I just had to setup this configuration at the forwarder level.&lt;BR /&gt;
For the record, I used this thread also: &lt;A href="http://answers.splunk.com/answers/1958/cant-route-forwarded-data-to-different-index"&gt;http://answers.splunk.com/answers/1958/cant-route-forwarded-data-to-different-index&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Now it works well with the "syslog" as a stanza in props.conf and the modified regexp into transforms.conf&lt;/P&gt;

&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Arthur&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80138#M5097</guid>
      <dc:creator>aandrieu</dc:creator>
      <dc:date>2013-08-21T09:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure Splunk for Nagios to ingest nagios events from syslog</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80139#M5098</link>
      <description>&lt;P&gt;You could stop nagios writing to syslog in nagios.conf on your nagios server.&lt;BR /&gt;
Reduces disk I/O on your monitoing server to &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2014 08:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-Splunk-for-Nagios-to-ingest-nagios-events/m-p/80139#M5098</guid>
      <dc:creator>avdheuvel</dc:creator>
      <dc:date>2014-05-07T08:10:36Z</dc:date>
    </item>
  </channel>
</rss>

