Coder Social home page Coder Social logo

rkondracki / sa-cim_vladiator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hire-vladimir/sa-cim_vladiator

0.0 1.0 0.0 377 KB

Data validator agains Splunk Common Information Model (CIM)

License: Apache License 2.0

CSS 8.84% JavaScript 13.19% Python 77.97%

sa-cim_vladiator's Introduction

Welcome

This Splunk app was developed with one goal in mind, reduce amount of time spent validating Splunk Common Information Model (CIM) compliance of technology add-ons (TA's). Use of this app simplifies validation process in several ways:

  • Identifies fields that are required, but missing
  • Validates data confirms to expected CIM values
  • Rapid prototyping and validation

This project is hosted on GitHub, https://github.com/hire-vladimir/SA-cim_vladiator

Install

App installation is simple, and only needs to be present on the search head. Documentation around app installation can be found at http://docs.splunk.com/Documentation/AddOns/released/Overview/Singleserverinstall

Getting Started

to fill

Screenshot

CIM validator

System requirements

App was developed for use with Splunk 6.2+

mvrex command

App ships with a custom command mvrex. Command allows flexibility by applying regex to MV fields, along with allowing variable/token substitution that allows for per row regex evaluation by the mean of lookups.

Command syntax

mvrex (<options>)?* <field> [<regex>]

Command arguments (optional)

Command implements arguments listed below. field argument is mandatory; rest are optional.

field=<regex_string> | debug=<bool> | showunmatched=<bool> | prefix=<string> | showcount=<bool> | labelfield=<string>

Examples

  • Command supports variable substitution, you are able to pass in new regex for each row in the dataset
... | eval regex="^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$" | mvrex field=mydata regex
  • Using debug option will enable additional logging on the command to help troubleshoot command, when things go wrong
... | mvrex debug=1 field=mydata "^\d{1,5}$"
  • Command support outputting counts of input, matched, and unmatched values
... | mvrex showcount=t showunmatched=t field=mydata "^\d{1,5}$"
  • Command support adding a prefix to output fields, also custom naming of fields
... | mvrex prefix="myprefix" labelfield="myfieldname" "^\d{1,5}$"

Troubleshooting

This command writes log data to $SPLUNK_HOME/var/log/splunk/mvrex.log, meaning that data is also ingested into Splunk. Magic, I know. Try searching:

index=_internal sourcetype=myrex

When debug level logging is required, pass in debug=true or debug=1 argument to the command. This will display enhanced logging in Splunk UI and the log file.

... | mvrex debug=1 field=mydata "^\d{1,5}$"

Legal

  • Splunk is a registered trademark of Splunk, Inc.

sa-cim_vladiator's People

Contributors

hire-vladimir avatar

Watchers

 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.