Giter Site home page Giter Site logo

kintyre / sa-cim_vladiator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hire-vladimir/sa-cim_vladiator

3.0 3.0 0.0 829 KB

Data validator agains Splunk Common Information Model (CIM)

License: Apache License 2.0

CSS 8.24% JavaScript 12.24% Python 72.83% Shell 6.68%

sa-cim_vladiator's People

Contributors

araman-m avatar hire-vladimir avatar lowell80 avatar mcm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sa-cim_vladiator's Issues

Update CIM lookup table

Build a new lookup table based on a new CIM:

Don't have time to complete this right now....

| datamodel
| spath
| table _raw modelName
| search [ rest /servicesNS/nobody/Splunk_SA_CIM/data/models | search eai:appName=Splunk_SA_CIM | rename title as modelName | fields modelName ]
| search modelName!="Splunk_CIM_Validation"
| spath output=objects "objects{}"
| fields - _raw
| mvexpand objects 
| spath input=objects output=outfields "calculations{}.outputFields{}"
| spath input=objects output=fields "fields{}" 
| eval fields=mvappend(fields, outfields) 
| fields - objects outfields
| mvexpand fields 
| spath input=fields 
| table modelName owner fieldName fieldSearch displayName comment.expected_values{} comment.recommended comment.description type hidden
| rename fieldName as field comment.description as description, type as data_type, comment.recommended as recommended 
| eval possible_values=mvjoin('comment.expected_values{}', ", ") 
| eval object = owner
| appendcols [ rest splunk_server=local /servicesNS/-/-/apps/local/Splunk_SA_CIM  | rename version as cim_version | table cim_version ]
| eventstats values(cim_version) as cim_version
| rename modelName as datamodel
| rex field=object mode=sed "s/^.*?\.([^.]+)$/\1/"
| search data_type!=objectCount NOT data_type=childCount NOT field=_time NOT field=host NOT field=source NOT field=sourcetype
| table cim_version, datamodel, object, field, data_type, description, possible_values, recommended
| sort datamodel object field
| dedup datamodel object field
| outputlookup cim_dictionary_new.csv

Compare the results:

| inputlookup cim_dictionary_new.csv | inputlookup append=t cim_validation_dictionary | sort - cim_version | search datamodel=* | fields - recommended | stats list(*) as * dc(*) as dc_* by datamodel object field | fields - dc_cim_version | eval diffs=0 | foreach dc_* [ eval diffs=if('<<FIELD>>'>1,1,0) ] | where diffs>=1 | fields - dc_*

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.