/artillery-plugin-splunk

A plugin for artillery.io that records stats and reports into HTTP Event Collector in Splunk

Primary LanguageJavaScriptMIT LicenseMIT

js-standard-style codeshipbuild codecov Known Vulnerabilities npm version

artillery-plugin-splunk

A plugin for artillery.io that records stats and reports into HTTP Event Collector in Splunk

Requirements

  • Node.js v4 or later.
  • Splunk Enterprise 6.3.0 or later, or Splunk Cloud.
  • An HTTP Event Collector token from your Splunk Enterprise server.

Setup

You need to setup HTTP event collector in splunk. instructions

  1. Install
$ npm install --save artillery-plugin-splunk
  1. Add artillery-plugin-splunk to config
config:
  target: "https://staging.example.com"
  plugins:
    splunk:
      url: 'XXX', # url to splunk cloud in this format https://input-prd-p-XXXXXXX.cloud.splunk.com:8088/services/collector)
      token: 'XXX' # token for HEC
      index: 'XXX' (optional) # splunk index

Debbuging

  1. Clone repo
$ git clone git@github.com:singerxt/artillery-plugin-splunk.git
  1. Link package
$ npm link artillery-plugin-splunk
  1. Create artillery script
config:
  target: "https://staging.example.com"
  plugins:
    splunk:
      url: 'XXX',
      token: 'XXX'
  phases:
    - duration: 300
      arrivalRate: 50
  1. run it
$ DEBUG=plugin:splunk artillery run script.yml