<?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: Am I using splunk-ansible playbook for role splunk_standalone correctly? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Am-I-using-splunk-ansible-playbook-for-role-splunk-standalone/m-p/405080#M71899</link>
    <description>&lt;P&gt;For example, in the docs for splunk containers, I see there is a way to generate defaults, instead of copy-pasting from the docs; and the documented way to run the play is to target using 'site.yml' directly to control the process.&lt;/P&gt;

&lt;P&gt;Having skipped both of those, I am wondering if I missed something that would allow the receiver to accept things correctly. But since I'm new to this, it could be literally anything.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 18:59:01 GMT</pubDate>
    <dc:creator>erik_purins</dc:creator>
    <dc:date>2019-02-21T18:59:01Z</dc:date>
    <item>
      <title>Am I using splunk-ansible playbook for role splunk_standalone correctly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Am-I-using-splunk-ansible-playbook-for-role-splunk-standalone/m-p/405079#M71898</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I am writing ansible playbooks that configure my local splunk universal forwarders.&lt;BR /&gt;
To setup a mock receiver under test, I am trying to correctly use the splunk-ansible github playbook / roles. I can setup a splunk_standalone ok, and it says it's ready to receive forwarded inputs on 9777, but I can't seem to connect to it correctly.&lt;/P&gt;

&lt;P&gt;How do I run the playbook to create an unlicensed vm for a test scenario, that can accept forwarders?&lt;BR /&gt;
There aren't any great (work out of the box) examples out there in the documentation.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;I am using molecule to spin up a pair of vagrant VMs; a 'splunk' centos VM (receiver) with the splunk_standalone role applied (github.com splunk splunk-ansible), and an 'ubuntu' VM with my own universal forwarder role applied. The version of splunk is the latest trial tgz from free enterprise 60 day trial.&lt;/P&gt;

&lt;P&gt;To converge the receiver, I synced the code and added the splunk_standalone role to the test suite roles path, and ran the role directly from a molecule converge playbook. I had to make some guesses about which vars to define, starting with the example defaults.yml for linux, which was a little incomplete.&lt;/P&gt;

&lt;P&gt;Before I run the play, I have to create the splunk dir, the splunk user and group, and afterwards, I configure inputs.conf.&lt;/P&gt;

&lt;P&gt;The included vars I used to run the play are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---
# &lt;A href="https://github.com/splunk/splunk-ansible/blob/develop/docs/USING_DEFAULTS.md" target="test_blank"&gt;https://github.com/splunk/splunk-ansible/blob/develop/docs/USING_DEFAULTS.md&lt;/A&gt;
hide_password: false
delay_num: 3
splunk_password: &amp;lt;sekret password&amp;gt;
splunk_gid: 500
splunk_uid: 500

# Splunk defaults plus remainder that allow play to run without error
retry_num: 100
splunk:
    # TASK [splunk_standalone : Enable HEC services] *********************************
    admin_user: molecule
    # TASK [splunk_common : Apply Splunk license] ************************************
    ignore_license: true
    # TASK [splunk_common : Download Splunk license] *********************************
    license_uri:
    # TASK [splunk_standalone : include_tasks] ***************************************
    apps_location:
    # TASK [splunk_common : Set as license slave] ************************************
    license_master_included: false
    role: splunk_standalone
    # TASK [splunk_common : include_tasks] *******************************************
    build_location: &amp;lt;my-desktop&amp;gt;/splunk-7.2.4-8a94541dcfac-Linux-x86_64.tgz

    opt: /opt
    home: /opt/splunk
    user: splunk
    group: splunk
    exec: /opt/splunk/bin/splunk
    pid: /opt/splunk/var/run/splunk/splunkd.pid
    password: "{{ splunk_password | default('invalid_password') }}"
    # This will be the secret that Splunk will use to encrypt/decrypt.
    # secret: &amp;lt;secret&amp;gt;
    svc_port: 8089
    s2s_port: 9997
    # s2s_enable opens the s2s_port for splunktcp ingestion.
    s2s_enable: 0
    http_port: 8000
    # This will turn on SSL on the GUI and sets the path to the certificate to be used.
    http_enableSSL: 0
    # http_enableSSL_cert:
    # http_enableSSL_privKey:
    # http_enableSSL_privKey_password:
    hec_port: 8088
    hec_disabled: 0
    hec_enableSSL: 1
    #The hec_token here is used for INGESTION only (receiving splunk events).
    #Setting up your environment to forward events out of the cluster is another matter entirely
    hec_token: 00000000-0000-0000-0000-000000000000
    app_paths:
        default: /opt/splunk/etc/apps
        shc: /opt/splunk/etc/shcluster/apps
        idxc: /opt/splunk/etc/master-apps
        httpinput: /opt/splunk/etc/apps/splunk_httpinput

    # Search Head Clustering
    shc:
        enable: false
        #Change these before deploying
        secret: some_secret
        replication_factor: 3
        replication_port: 9887

    # Indexer Clustering
    idxc:
        #Change before deploying
        secret: some_secret
        search_factor: 2
        replication_factor: 3
        replication_port: 9887
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When the VMs are converged, logging in with &lt;CODE&gt;molecule login -h &amp;lt;hostname&amp;gt;&lt;/CODE&gt;, netcat says their ssh ports are visible to each other. The VMs are configured to broadcast/receive on the 10.0.0.0/24 ip range. Spunk receiver is at 10.0.0.1 and splunk forwarder is at 10.0.0.2&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;nc -zv 127.0.0.1 9997&lt;/CODE&gt; run on the receiver says the port 9997 is connected to ok. But from the forwarder,&lt;CODE&gt;nc -zv 10.0.0.1 9997&lt;/CODE&gt; returns error. This is in line with errors seen on the forwarder in splunk.log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR TcpOutputFd - Connection to host=10.0.0.1:9997 failed
WARN  TcpOutputProc - Applying quarantine to ip=10.0.0.1 port=9997 _numberOfFailures=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the receiver, &lt;CODE&gt;splunk list inputstatus&lt;/CODE&gt; shows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;snipped local log listeners&amp;gt;
tcp_cooked:listenerports :
    9997
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's no active firewalls on the VMs, they're lightweight configurations for testing config management code.&lt;/P&gt;

&lt;P&gt;Currently, the receiver inputs at &lt;CODE&gt;./system/local/inputs.conf&lt;/CODE&gt; (or if I use the web UI, &lt;CODE&gt;./apps/splunk_monitoring_console/local/inputs.conf&lt;/CODE&gt;) are set to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[splunktcp://9997]
listenOnIPv6 = no
disabled = 0
acceptFrom = 10.0.0.0/24
connection_host = ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried this with ip6 enabled, and/or with connection_host set to none (dns is not configured on these hosts), but without success.&lt;/P&gt;

&lt;P&gt;The forwarder outputs at &lt;CODE&gt;./system/local/outputs.conf&lt;/CODE&gt; is set to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup = default-autolb-group

[tcpout:default-autolb-group]
server = 10.0.0.1:9997

[tcpout-server://10.0.0.1:9997]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My sub questions are:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Do the configs (vars used, inputs/outputs files) look reasonable?&lt;/LI&gt;
&lt;LI&gt;What is the right way to apply the ansible role for splunk_standalone, unlicensed, so it can accept forwarders? (aka, 'did I run the role incorrectly', or should I have run more than one role).&lt;/LI&gt;
&lt;LI&gt;Is the splunk_standalone role, unlicensed, able to accept forwarders?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Ideas? What other troubleshooting steps can I take?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Am-I-using-splunk-ansible-playbook-for-role-splunk-standalone/m-p/405079#M71898</guid>
      <dc:creator>erik_purins</dc:creator>
      <dc:date>2019-02-21T18:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Am I using splunk-ansible playbook for role splunk_standalone correctly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Am-I-using-splunk-ansible-playbook-for-role-splunk-standalone/m-p/405080#M71899</link>
      <description>&lt;P&gt;For example, in the docs for splunk containers, I see there is a way to generate defaults, instead of copy-pasting from the docs; and the documented way to run the play is to target using 'site.yml' directly to control the process.&lt;/P&gt;

&lt;P&gt;Having skipped both of those, I am wondering if I missed something that would allow the receiver to accept things correctly. But since I'm new to this, it could be literally anything.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Am-I-using-splunk-ansible-playbook-for-role-splunk-standalone/m-p/405080#M71899</guid>
      <dc:creator>erik_purins</dc:creator>
      <dc:date>2019-02-21T18:59:01Z</dc:date>
    </item>
  </channel>
</rss>

