curl -k -u admin:changeme https://localhost:8089/services/auth/login -d username=admin -d password=changeme
http://dev.splunk.com/view/SP-CAAAEWS
http://docs.splunk.com/Documentation/Splunk/6.6.2/RESTREF/RESTaccess#auth.2Flogin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Search Controls: Tokens</title>
<link rel="stylesheet" type="text/css" href="static/splunkjs/css/bootstrap.css" />
<style>
.main-area {
padding: 30px;
}
</style>
</head>
<body>
<div>
<div class="main-area">
<p>This example shows how to set up SearchBar and SearchControls views using Django tags, and sync them with a SearchManager using tokens.</p>
<p><b>Note:</b> The Timeline view can't be synced using tokens. Use events instead.</p>
<div id="mysearchbar1"></div>
<div id="mysearchcontrols1"></div>
<div id="mytable1"></div>
</div>
</div>
<script src="static/splunkjs/config.js"></script>
<script>
// Configure SplunkJS Stack
splunkjs.config({
scheme: 'https',
host: '192.168.1.6',
port: 8089,
authenticate: {username: 'admin', password: 'abcd'},
});
/* splunkjs.config({
scheme: "https",
host: "localhost",
port: 8089,
authenticate: function(done) {
require([
"jquery",
"jquery.cookie"
], function($) {
// Retrieve the session key and username from cookies
var splunkSessionKey = $.cookie("splunk_sessionkey");
var splunkCurrentUser = $.cookie("splunk_username");
// Log in using the session key and username
if (splunkSessionKey) {
done(null, {sessionKey: splunkSessionKey, username: splunkCurrentUser});
}
// If there is no session key, redirect to the login form
else {
window.location.replace("login_form.html");
}
});
}
}); */
// Configure the web site's base URL
require.config({
baseUrl: "static/"
});
// Set up the Web Framework components
var deps = [
"splunkjs/ready!",
"splunkjs/mvc/searchmanager",
"splunkjs/mvc/searchbarview",
"splunkjs/mvc/searchcontrolsview",
"splunkjs/mvc/tableview"
];
require(deps, function(mvc) {
// Load individual components
var SearchManager = require("splunkjs/mvc/searchmanager");
var SearchbarView = require("splunkjs/mvc/searchbarview");
var SearchControlsView = require("splunkjs/mvc/searchcontrolsview");
var TableView = require("splunkjs/mvc/tableview");
// Create the search manager and views
var mysearch = new SearchManager({
id: "search1",
search: mvc.tokenSafe("$searchquery$"),
earliest_time: mvc.tokenSafe("$earlyval$"),
latest_time: mvc.tokenSafe("$lateval$"),
app: "search",
preview: true,
required_field_list: "*",
status_buckets: 300
});
var mysearchbar = new SearchbarView({
id: "searchbar1",
managerid: "search1",
value: mvc.tokenSafe("$searchquery$"),
timerange_earliest_time: mvc.tokenSafe("$earlyval$"),
timerange_latest_time: mvc.tokenSafe("$lateval$"),
default: "index=_internal | head 100",
el: $("#mysearchbar1")
}).render();
var mysearchcontrols = new SearchControlsView({
id: "searchcontrols1",
managerid: "search1",
el: $("#mysearchcontrols1")
}).render();
var mytable = new TableView({
id: "table1",
managerid: "search1",
el: $("#mytable1")
}).render();
});
</script>
</body>
</html>
相关推荐
You will also have the opportunity to test drive Splunk's powerful HTTP event collector. After covering the core Splunk functionality, you'll be provided with some real-world best practices in using ...
require 'rubygems' require 'splunk-client'# Create the clientsplunk = SplunkClient.new("username", "password", "hostname")# Create the Searchsearch = splunk.search("test_search")# Wait for the S
Splunk参考应用程序-PAS(Ember更新)-测试回购版本1.5.x Splunk参考应用程序-PAS教您... tests / PythonTest -Selenium测试以通过浏览器驱动应用程序。 测试/单元测试-C#中的替代Selenium测试。 tests / pas_sample_d
https://<splunk>:<managment>/servicesNS/nobody/Splunk_TA_Modinput_Test/Splunk_TA_Modinput_Test_perform_crd_operation/<entry>/create 必需的参数: file_path :文件的路径以及文件名 数据:要写入文件的...
流利的插件-企业级企业 目录 安装 $ fluent-gem install fluent-plugin-splunk-enterprise Splunk HTTP事件收集器输出插件 Splunk TCP输入输出插件 ... $ SPLUNK_VERSION=<splunk> bundle exec rake test
node $SPLUNK_HOME/etc/apps/webperf/bin/node/test.jsServer running at http://127.0.0.1:7000在浏览器中点击 。 根据需要打开端口。启动 Node 服务器以接收和记录来自 boomerang.js 的性能数据 sudo node $...
S3兼容性测试 这是一组非官方的Amazon AWS S3兼容性测试,对于实施公开类似于S3的API的软件的人们可能有用。 测试使用Boto2和Boto3库。...S3TEST_CONF=your.conf ./virtualenv/bin/nosetests 您可以指定要运行
测试部署ds触发github动作-尝试3
该文件包含Unix Shell脚本的源代码,以执行将模块输入从Splunk加载项生成器(AOB)生成的源库迁移到新的基于Splunk UCC的加载项(aka TA)的过程。 该脚本使用AOB的python3库中的辅助函数,并将AOB生成的Inputs的源...
必须创建must来填补在尝试对Splunk进行压力测试时发现的空白,因为需要真实,可索引和有意义的数据。 必须(最终)作为使用XML配置的独立工具(用于快速使用和咨询等)和基于Web的工具(用于更永久/更漂亮的部署...
分析技术: 数据处理:自然语言处理技术 统计和分析:A/B test; top N排行榜;地域占比;文本情感分析 数据挖掘:关联规则分析;分类;聚类 模型预测:预测模型;机器学习;建模仿真 大数据技术: 数据采集:ETL...