GithubHelp home page GithubHelp logo

splunk-relay's Introduction

Splunk relay for Chef Automate

Deploy to Azure

Use this Chef Automate Splunk integration to channel notification messages such as:

  • Chef Client run failures
  • Compliance failures

into Splunk.

You will need a Splunk account that has been configured with an HTTP Event Collector input. From Splunk you will need the customer id and the token in order to post data.

Parameters

The template contains a number of parameters that customise the way in which the function is deployed and runs. The following table describes these parameters.

Name Description Default Value
functionsAppName Name of the Function App within the resource group chef-automate-relay-splunk
functionsStorageAccountType Storage type for the storage account in which the function will be stored Standard_LRS
splunkCustomerId Customer ID within the Splunk platform
splunkToken API Token that has been set on the HTTP Endpoint Collector (HEC)
splunkChannel UUID string to designate a channel within Splunk
splunkPort Port on which to communciate with the HEC 8088
splunkNoSslVerify Do not verify the Splunk HEC certificate 0

The splunkChannel and splunkNoSslVerify are specified on the URL for the Azure Function when called. The format is as follows

https://<APP_NAME>.azurewebsites.net/api/<CHANNEL>/<LOG_TYPE>/<SSL_VERIFY>?code=xxxxxx

The log type is intended to be one of the following options and allows Chef client and Cmpliance information to be tagged accordingly:

  • ChefClientRunFailure
  • ComplianceFailure

The xxxxxx for the code is the token that is required when using the Azure Function. This is retrievebale from the function itself or the outputs of the ARM template.

How to deploy the template

Azure Portal

Simply press the Deploy to Azure button to launch the template within your Azure Subscription. You are required to complete the form:

Azure Portal Parameters

When the deployment has completed go to the Resource Group and click the item below 'Deployments'. (It should state '1 Succeeded'). Then click on the 'Microsoft.Template' to show the outputs:

Azure Portal Outputs

These outputs are required when configuring Chef Automate.

Command Line

Alternatively the relay can be deployed from the command line using the Azure CLI or Powershell.

Clone the repo to the local machine.

Azure CLI

az group create -n "splunk-relay-example" -l "westeurope"
az group deployment create -g "splunk-relay-example" --template-file azuredeploy.json --parameters @parameters.json --no-wait

The outputs from the template can be see when the deployment is interrogated.

az group deployment list -g "splunk-relay-example"

NOTE: The outputs will not be displayed until the deployment is complete and successful.

Any deployments from the command line are also shown in the Azure Portal.

PowerShell

New-AzureRmResourceGroup -Name "splunk-relay-example" -Location "westeurope"
New-AzureRmResourceGroupDeployment -Name "ExampleSplunkRelayDeployment" -ResourceGroupName "splunk-relay-example" -TemplateFile .\azuredeploy.json -TemplateParameterFile .\parameters.json

Configure Automate

Once the output information has been retrieved configure Chef Automate by adding a new Custom Notification in the Notifications tab.

Custom Notifications

All Notifications

Thats it! Now after some of the nodes have checked in you should be able to see data in the Splunk instance.

Chef Automate logging to Splunk

Compatibility

You will need Chef Automate 1.6.99 or above to use this integration.

If you do not see 'Notifications' on the side bar, enable the functionality in Chef Automate visit the 'Nodes' tab, click on any white space on the page an type BETA. A new notifications side menu will appear.

Licensing

This integration is provided free of charge to customers of Chef Automate. Charges may apply for usage of Splunk.

(c) 2017 Chef Software, Inc.

splunk-relay's People

Contributors

russellseymour avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.