### App details response example Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-config-service-manual/10.2.2510/administer-splunk-cloud-platform-using-the-admin-config-service-acs-api/manage-private-apps-in-splunk-cloud-platform Example JSON response when an app is successfully installed. The status field indicates 'installed'. ```json { "label": "tos", "name": "tos", "status": "installed", "version": "" } ``` -------------------------------- ### JSON Response Example Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-config-service-manual/10.3.2512/admin-config-service-acs-api-endpoint-reference Example of a JSON response indicating app installation status. ```json { "label": "pa1", "name": "pa1", "status": "installed", "version": "1.2.2" } ``` -------------------------------- ### SPL2 FROM Command: Start with SELECT Clause Source: https://help.splunk.com/en/splunk-cloud-platform/search/spl2-search-reference/from-command This example demonstrates starting an SPL2 search with the SELECT clause, followed by FROM, WHERE, and GROUP BY clauses. It achieves the same result as starting with the FROM clause. ```spl SELECT sum(bytes) AS sum, host FROM main WHERE earliest=-5m@m GROUP BY host ``` -------------------------------- ### SPL2 FROM Command: Start with FROM Clause Source: https://help.splunk.com/en/splunk-cloud-platform/search/spl2-search-reference/from-command This example demonstrates starting an SPL2 search with the FROM clause, followed by WHERE, GROUP BY, and SELECT clauses. ```spl FROM main WHERE earliest=-5m@m GROUP BY host SELECT sum(bytes) AS sum, host ``` -------------------------------- ### Example GET Request for Applications Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-config-service-manual/10.3.2512/using-the-admin-config-service-acs--api/basic-setup-and-usage-concepts-for-the-admin-config-service-acs-api This example demonstrates how to make a GET request to retrieve a list of applications installed on a Splunk Cloud Platform deployment. ```APIDOC ## Example GET Request for Applications To retrieve a list of applications installed on your Splunk Cloud Platform deployment, send a request to the following URL: ``` https://admin.splunk.com/{stack}/adminconfig/v2/apps/victoria ``` **Method:** GET **Endpoint:** `https://admin.splunk.com/{stack}/adminconfig/v2/apps/victoria` **Note:** Replace `{stack}` with the URL prefix of your Splunk Cloud Platform deployment. ``` -------------------------------- ### Example: Import 'main' Index Source: https://help.splunk.com/en/splunk-cloud-platform/search/spl2-search-manual/export-import-and-namespaces/understanding-spl2-namespaces An example of importing the 'main' index using the tilde shortcut for the `indexes` namespace. ```SPL2 import main from ~indexes ``` -------------------------------- ### Retrieve a list of local Splunk applications using an authentication token Source: https://help.splunk.com/en/splunk-cloud-platform/administer/manage-users-and-security/10.2.2510/authenticate-into-the-splunk-platform-with-tokens/use-authentication-tokens This example accesses the /apps/local endpoint to get a list of installed applications. The response is in Atom XML format. ```bash curl -H "Authorization: Bearer eyJraWQ..." -X GET https://10.224.100.135:34740/services/apps/local ``` ```xml localapps https://10.224.100.135:34740/services/apps/local 2019-02-13T23:05:24+00:00 Splunk 18 30 0 alert_logevent ... ... ``` -------------------------------- ### Start Splunk Forwarder Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-manual/10.2.2510/get-data-into-splunk-cloud-platform/get-nix-data-into-splunk-cloud-platform Start the Splunk forwarder service after installation. ```bash ./splunk start ``` -------------------------------- ### Start Stream Forwarder Service Source: https://help.splunk.com/en/splunk-cloud-platform/collect-stream-data/install-and-configure-splunk-stream/8.1/install-and-configure-your-splunk-stream-forwarder/install-an-independent-stream-forwarder Start the streamfwd service after automated installation. ```bash sudo service streamfwd start ``` -------------------------------- ### App installation success response Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-config-service-manual/10.2.2510/administer-splunk-cloud-platform-using-the-admin-config-service-acs-api/manage-private-apps-in-splunk-cloud-platform This is an example of a successful app installation response from the ACS API, indicating the app has been installed. ```json { "label": "pa1", "name": "pa1", "status": "installed", "version": "1.2.2" } ``` -------------------------------- ### Example Name Data Example Source: https://help.splunk.com/en/splunk-cloud-platform/apply-machine-learning/use-ai-toolkit/5.7.1/additional-resources/share-data-in-the-ai-toolkit Provides an example of how the name of a Showcase example is logged. ```JSON { 'example_name': "'Predict Server Power Consumption'" } ``` -------------------------------- ### Example Name Example Source: https://help.splunk.com/en/splunk-cloud-platform/apply-machine-learning/use-ai-toolkit/5.7.3/additional-resources Specifies the name of the Showcase example being executed. ```JSON { 'example_name': "'Predict Server Power Consumption'" } ``` ```JSON { 'example_name': "'Predict Server Power Consumption'" } ``` -------------------------------- ### Complete Formatter Example Source: https://help.splunk.com/en/splunk-cloud-platform/developing-views-and-apps-for-splunk-web/10.4.2604/custom-visualizations/formatter-api-reference An example of a `formatter.html` file demonstrating a text input for maximum value and a color picker for dial color. This showcases the usage of `` with different input types. ```html
``` -------------------------------- ### Get Scheduled Times Example Source: https://help.splunk.com/en/splunk-cloud-platform/leverage-rest-apis/rest-api-reference/10.4.2604/search-endpoints/search-endpoint-descriptions Example of how to retrieve scheduled times for a view using earliest_time and latest_time parameters. ```APIDOC ## GET /services/scheduled/views/_ScheduledView__dashboard_live/scheduled_times ### Description Retrieves the scheduled times for a specific view, allowing filtering by a time range. ### Method GET ### Endpoint /services/scheduled/views/_ScheduledView__dashboard_live/scheduled_times ### Parameters #### Query Parameters - **earliest_time** (string) - Required - The earliest time for the data range. - **latest_time** (string) - Required - The latest time for the data range. ### Request Example ```bash curl -k -u admin:admin https://localhost:8089/services/scheduled/views/_ScheduledView__dashboard_live/scheduled_times --get -d earliest_time=-5h -d latest_time=-3h ``` ### Response #### Success Response (200) (Response structure not provided in source) ``` -------------------------------- ### SPL2 'from' command example Source: https://help.splunk.com/en/splunk-cloud-platform/search/spl2-overview/specific-differences-between-spl-and-spl2 This is an example of the SPL2 'from' command syntax, demonstrating filtering, grouping, and ordering. ```SPL2 $from2 = from my_search where host="www2" group by action select action, count(action) order by action desc ``` -------------------------------- ### Example GET Request for Datasets Source: https://help.splunk.com/en/splunk-cloud-platform/leverage-rest-apis/rest-api-reference/10.2.2510/search-endpoints An example cURL command to retrieve datasets, filtering by kind and specifying the count. ```bash % curl -s -u : -X GET 'https://:/services/orchestrator/v1/datasets?kind=view,index&count=2' ``` -------------------------------- ### Form with Dropdown and Time Pickers Source: https://help.splunk.com/en/splunk-cloud-platform/create-dashboards-and-reports/simple-xml-dashboards/10.4.2604/create-dashboards-with-simple-xml/form-examples This example demonstrates a complete form with a dropdown for source type selection and both global and local time pickers. It illustrates how to use tokens to drive searches in different panels. ```xml
splunkd splunkd splunk_web_access splunkd_ui_access -7d@h now
Source type time chart index = _internal sourcetype=$sourcetype_tok$ | timechart count by sourcetype Source type event counter -24h@h now index=_internal sourcetype=$sourcetype_tok$ | stats count as sourcetype $time_tok.earliest$ $time_tok.latest$
``` -------------------------------- ### App Installation Response Source: https://help.splunk.com/en/splunk-cloud-platform/administer/admin-config-service-manual/10.2.2510/admin-config-service-acs-api-endpoint-reference Example JSON response after initiating the installation of a Splunkbase app. It includes details about the app being processed. ```json { "appID": "SplunkforPaloAltoNetworks", "label": "Palo Alto Networks App for Splunk", "name": "SplunkforPaloAltoNetworks", "splunkbaseID": "491", "status": "processing", "version": "7.0.4" } ``` -------------------------------- ### Complete Formatter Example with Input and Color Picker Source: https://help.splunk.com/en/splunk-cloud-platform/developing-views-and-apps-for-splunk-web/10.2.2510/custom-visualizations/formatter-api-reference An example demonstrating a complete formatter.html structure, including a text input for maximum dial value and a color picker for dial color. ```html
```
``` ``` -------------------------------- ### Create Dashboard using REST API Source: https://help.splunk.com/en/splunk-cloud-platform/create-dashboards-and-reports/dashboard-studio/10.2.2510/manage-dashboards/create-a-dashboard-using-rest-api-endpoints This example demonstrates creating a dashboard named 'sample_dashboard' using the `/data/ui/views` endpoint. It includes the dashboard's name, theme, label, description, definition (with inputs, data sources, visualizations, and layout), and hidden elements configuration. ```bash curl -k -u admin:pass https://localhost:8089/servicesNS/admin/search/data/ui/views \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=sample_dashboard' \ --data-urlencode 'eai:data= Sample Description ' ``` ```bash curl -k -u admin:pass https://localhost:8089/servicesNS/admin/search/data/ui/views \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=sample_dashboard' \ --data-urlencode 'eai:data= Sample Description ' ``` -------------------------------- ### SPL2 Search Starting with FROM Clause Source: https://help.splunk.com/en/splunk-cloud-platform/search/spl2-search-reference/from-command/from-command-usage An example of an SPL2 search that starts with the FROM clause, including WHERE, GROUP BY, SELECT, and ORDER BY clauses. ```spl $from_example = FROM sample_data_index WHERE host="www2" GROUP BY action SELECT action, count(action) AS 'Action Count' ORDER BY action DESC ``` -------------------------------- ### Pan and Zoom Dashboard Example Source: https://help.splunk.com/en/splunk-cloud-platform/create-dashboards-and-reports/simple-xml-dashboards/10.2.2510/simple-xml-reference This example demonstrates how to create a dashboard with two charts that interact with each other. The first chart displays data for the last 7 days, and selecting a time range on it updates the second chart to show details for the selected period. It also shows how to capture and display token values related to the selection. ```xml Pan and Zoom (All source types) index=_internal | timechart count by sourcetype -7d@h now $start$ $end$ $start.splunk_web_access$ $end.splunk_web_access$ Pan and Zoom (Web access source type) index=_internal sourcetype=splunk_web_access | timechart count by sourcetype $selection.earliest$ $selection.latest$

Token values for the splunk_web_access selection

Time range (epoch time)

$$selection.earliest$$: $selection.earliest$ $$selection.latest$$: $selection.latest$

Count at the begining and end of time range.

$$start.splunk_web_access$$: $start.splunk_web_access$ $$end.splunk_web_access$$: $end.splunk_web_access$

``` -------------------------------- ### Start Splunk Enterprise on Linux Source: https://help.splunk.com/en/splunk-cloud-platform/get-started/search-tutorial/10.2.2510/part-1-getting-started/launch-splunk-web Navigate to the bin directory of your Splunk Enterprise installation and start the service using the CLI. ```bash cd /bin ./splunk start ```