Giter Site home page Giter Site logo

splunk's People

Contributors

dreadknot avatar

splunk's Issues

splunk

Send in data with the cli

root@master:/opt/splunk/bin/scripts# splunk add oneshot status.txt
Your session is invalid.  Please login.
Splunk username: admin
Password:
Oneshot '/opt/splunk/bin/scripts/status.txt' added
root@master:/opt/splunk/bin/scripts# splunk add oneshot status.txt
Oneshot '/opt/splunk/bin/scripts/status.txt' added
root@master:/opt/splunk/bin/scripts# splunk add oneshot status.txt
Oneshot '/opt/splunk/bin/scripts/status.txt' added

with parameters

splunk add oneshot status.txt -index githubstatus -sourcetype githubstatus

Check index

splunkd fsck --mode metadata --all

Test Scripted Inputs

From splunkgit# less How\ to\ test\ scripts.txt
http://apps.splunk.com/app/836/#

This is how you can manually test our scripted inputs.

Prerequisites:

  1. Make sure 'splunk' is in your $PATH.
  2. Make sure you've read and understood our README.md

Test the scripts by opening up a terminal and locating the 'bin' folder of this app, which could be located at:
$SPLUNK_HOME/etc/apps/splunkgit/bin

To test our git repository data type:
splunk cmd ./fetch_git_repo_data.sh

To test the github data type:
splunk cmd python fetch_github_data.py

Apps

Make an app

root@master:/opt/splunk/etc/apps# tar -cvzf githubstatus.tar.gz githubstatus
githubstatus/
githubstatus/local/
githubstatus/local/app.conf
githubstatus/bin/
githubstatus/bin/status.txt
githubstatus/bin/jq
githubstatus/bin/README
githubstatus/bin/githubstatus.sh
githubstatus/metadata/
githubstatus/metadata/default.meta
githubstatus/metadata/local.meta
githubstatus/default/
githubstatus/default/indexes.conf
githubstatus/default/props.conf
githubstatus/default/data/
githubstatus/default/data/ui/
githubstatus/default/data/ui/views/
githubstatus/default/data/ui/views/github_status.xml
githubstatus/default/data/ui/views/README
githubstatus/default/data/ui/nav/
githubstatus/default/data/ui/nav/default.xml
githubstatus/default/app.conf
githubstatus/default/inputs.conf

search

index="sslstatus" | rex "After : (?<expires>.*)" | eval remaining=strptime(expires, "%b %d %H:%M:%S %Y %Z") | eval window=relative_time(remaining,"-120d@d") | where now() > window

index="sslstatus" | rex "After : (?<expires>.*)" | eval remaining=strptime(expires, "%b %d %H:%M:%S %Y %Z") | eval window=relative_time(remaining,"-90d@d") | where now() > window

index="sslstatus" | rex "After : (?<expires>.*)" | eval remaining=strptime(expires, "%b %d %H:%M:%S %Y %Z") | eval window=relative_time(remaining,"-30d@d") | where now() > window

source=*celeryd_main* "succeeded in"  | rex "Task (?<task>[a-z.A-Z]*)"

index=*something* source="/opt/splunk/var/log/splunk/license_usage.log" type=Usage | eval VolKB=round((b/1024),2) | timechart span=1h usenull=false useother=false sum(VolKB) by idx | addtotals |accum Total as TotalVolume |

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.