Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to create an HTML app setup page and have searches read a database name from a set configuration?

$
0
0
I have a simple page that I converted from Simple XML to HTML. It does some searches to a DB and gives the results in a few panels. Now I need to provide a way to configure parts of the app after it's deployed. For instance in the following search, I need to read the database name from some type of config so that the `dbquery` is done on the correct database. var search1 = new SearchManager({ "id": "search1", "cancelOnUnload": true, "latest_time": "now", "search": "| dbquery Database1 limit=1000 \"SELECT COUNT(*) FROM table1 WHERE status = 0;\"", "status_buckets": 0, "earliest_time": "0", "app": utils.getCurrentApp(), "auto_cancel": 90, "preview": true }, {tokens: true, tokenNamespace: "submitted"}); Right now it's hard-coded as Database1, but I'd like instead to get that from a config - and also provide a page where an admin user of the app can specify settings like this.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>