How to use the splunk-sdk.Async function in splunk-sdk

To help you get started, we’ve selected a few splunk-sdk examples, based on popular ways it is used in public projects.

github splunk / splunk-sdk-javascript / examples / modularinputs / github_commits / bin / app / github_commits.js View on Github external
(function() {
    var fs              = require("fs");
    var path            = require("path");
    var GithubAPI       = require("github");
    var splunkjs        = require("splunk-sdk");
    var Async           = splunkjs.Async;
    var ModularInputs   = splunkjs.ModularInputs;
    var Logger          = ModularInputs.Logger;
    var Event           = ModularInputs.Event;
    var Scheme          = ModularInputs.Scheme;
    var Argument        = ModularInputs.Argument;
    var utils           = ModularInputs.utils;

    // The version number should be updated every time a new version of the JavaScript SDK is released.
    var SDK_UA_STRING = "splunk-sdk-javascript/1.9.0";

    // Create easy to read date format.
    function getDisplayDate(date) {
        var monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

        date = new Date(date);
github splunk / splunkrepl / splunkrepl.js View on Github external
var repl = require("repl")
 , path = require('path')
 , fs = require('fs')
 , splunk = require('splunk-sdk')
 , prettyjson = require('prettyjson')
 , url = require('url')
 , open = require('open')
 , Async = splunk.Async
 , colors = require('colors')
 , Table = require('cli-table')
 , nconf = require('nconf');

var self = this;
var argv = require('minimist')(process.argv.slice(2));
var query = argv.query;
var verbose = argv.verbose;
var hosted = argv.hosted;
var useJson = argv.json;

function checkArgs() {
    var firstParam = process.argv[2];
    if (firstParam == "?" || firstParam == "help" || firstParam=="--help") {
        console.log("\r\nusage:".white); 
        console.log("\t--host - Splunk's host".white.bold)

splunk-sdk

SDK for usage with the Splunk REST API

Apache-2.0
Latest version published 3 months ago

Package Health Score

77 / 100
Full package analysis

Similar packages