Activity Feed
- Got Karma for What is the difference between single-instance and multiple-instance modular inputs for REST API?. 11-12-2021 06:57 AM
- Got Karma for Splunk Modular Input is not showing Data Input Parameter of type Checkbox properly while adding a new input. 04-15-2021 04:37 PM
- Posted How to increase execution speed of multiples searches in Splunk JavaScript Web Framework? on Splunk Search. 07-29-2020 11:26 AM
- Posted Re: How to use updated version of moment.js in my dashboard? on Splunk Enterprise. 06-22-2020 02:03 AM
- Posted How to use updated version of moment.js in my dashboard? on Splunk Enterprise. 06-18-2020 10:44 AM
- Karma Re: Should I build my integration for Splunk Enterprise or Splunk Enterprise Security? for LukeMurphey. 06-05-2020 12:50 AM
- Karma Re: Should I build my integration for Splunk Enterprise or Splunk Enterprise Security? for LukeMurphey. 06-05-2020 12:50 AM
- Got Karma for Why is Splunk Search Assistant highlighting certain words from my description in green color?. 06-05-2020 12:50 AM
- Karma Re: Where are edits to the navigation menu from settings -> user interface and editing using dashboard editor saved? for elliotproebstel. 06-05-2020 12:49 AM
- Karma Re: After converting an XML dashboard to HTML, where do I add CSS and javascript files on the filesystem and reference the items in the HTML? for stephanefotso. 06-05-2020 12:47 AM
- Karma Re: How to return search manager result as JSON for jeffland. 06-05-2020 12:47 AM
- Posted Re: How to get encrypted password fields during modular input parameters validation? on All Apps and Add-ons. 05-19-2020 10:49 PM
- Posted How to get encrypted password fields during modular input parameters validation? on All Apps and Add-ons. 05-17-2020 12:20 PM
- Tagged How to get encrypted password fields during modular input parameters validation? on All Apps and Add-ons. 05-17-2020 12:20 PM
- Posted Re: Splunk Modular Input is not showing Data Input Parameter of type Checkbox properly while adding a new input on All Apps and Add-ons. 05-13-2020 03:39 AM
- Posted How to avoid duplication of events for multiple modular inputs? on Splunk Dev. 05-12-2020 12:46 PM
- Tagged How to avoid duplication of events for multiple modular inputs? on Splunk Dev. 05-12-2020 12:46 PM
- Tagged How to avoid duplication of events for multiple modular inputs? on Splunk Dev. 05-12-2020 12:46 PM
- Tagged How to avoid duplication of events for multiple modular inputs? on Splunk Dev. 05-12-2020 12:46 PM
- Tagged How to avoid duplication of events for multiple modular inputs? on Splunk Dev. 05-12-2020 12:46 PM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
1 | |||
1 | |||
0 | |||
0 | |||
1 |
07-29-2020
11:26 AM
Hi all, I have developed an app that has a custom dashboard. On that custom dashboard, I am using Splunk's JavaScript Web Framework to run my custom searches that call our external REST API and then the dashboard is rendered using results returned from those searches. Specifically, I'm using the Search Manager to define and process results from my searches. The code structure that I'm following for each search is as follows: var phishInc = new SearchManager({
id: "phishing_inc",
preview: true,
cache: true,
search: "| snxusers stat=phishing_breakdown globalFilterValue=$globalFilterValue$"
}, {tokens: true});
phishInc.on('search:failed', function(properties) {
});
phishInc.on('search:progress', function(properties) {
});
phishInc.on('search:done', function(properties) {
});
var phishing_inc_search = splunkjs.mvc.Components.get('phishing_inc');
var phishing_inc_results = phishing_inc_search.data("results", {count: 0, output_mode: 'json_rows'});
phishing_inc_results.on("data", function () {
// The data from the search is processed here
}); $globalFilterValue$ is a token that I have defined whose value I set from a drop-down menu. Whenever I set its value, my searches are triggered automatically as I have set tokens: true Now I have observed that for a single search only, the results are returned pretty quickly but when I define all of my searches (total = 15) their times add up and the complete dashboard is rendered slowly. Since all of those searches depend on the globalFilterValue token, they are probably running in a sequential manner due to which the last parts of the dashboard are rendered at the end. Is there any way to speed up the execution of all these searches by somehow running them in a parallel fashion? Does Splunk JavaScript Web Framework allow any such possibility?
... View more
06-22-2020
02:03 AM
Hi @kamlesh_vaghela, Thanks a lot for taking out your time to answer this. I just have a couple of questions. 1. Will my path in this case be? /static/app/mysplunkapp/moment.js Right now I'm using the library from a CDN server and giving the path below. Is that also okay? https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-withlocales.min.js 2. Do I need the line below as I have already loaded the library? var moment = require('moment'); Thanks again for your help!
... View more
- Tags:
- hi
06-18-2020
10:44 AM
Hi everyone, I am using version 8.0.0 of Splunk Enterprise and I am running into a problem due to version conflict of a JavaScript library. In one of my dashboards, I am using JavaScript for some customization where I require moment.js for a Date-picker. The Date-picker library only works with version 2.24.0 however, Splunk also uses moment.js for its own working but an older version 2.8.3. When I try to include moment.js (version 2.24.0) there is a conflict with Splunk's version and hence I cannot use that library in my dashboard. Please suggest me any way to resolve this conflict between Splunk's version of moment.js and my own version as the Date-picker library is only compatible with version 2.24.0 of moment.js Shall be hugely grateful for any positive suggestions. Regards, Umair
... View more
- Tags:
- dashboard
- javascript
Labels
- Labels:
-
upgrade
-
using Splunk Enterprise
05-19-2020
10:49 PM
No use doing it by CLI. Need to do this in my modular input script. Thanks though!
... View more
05-17-2020
12:20 PM
Hi all,
I am stuck in a very unfortunate condition. I am developing a modular input (using Splunk Add-on builder) that takes two input parameters, a Base URL and an API key. I am interested in validating both in my validate_input by sending a request to our server and if the response is good, then let the user save the input parameters. The problem is that my API key input parameter is of type password and in my validate_input method, I am only able to get its encrypted value in the form of ***********. How can I get its plain value so that I can use it to send request to the server? Here's my sample code for the validate_input method.
def validate_input(helper, definition):
"""Implement your own validation logic to validate the input stanza configurations"""
# This example accesses the modular input variable
snx_base_url = definition.parameters.get('snx_base_url', None)
snx_api_key = definition.parameters.get('snx_api_key', None)
Please point me in a direction that can help me achieve the above. I shall be highly thankful to you!
Regards,
Umair
... View more
05-13-2020
03:39 AM
I can share my source code as well. Please advise the proper way to do so?
... View more
05-12-2020
12:46 PM
Dear All,
I have created a Python modular input (of multiple instance type) using Splunk's Add-on builder that polls a REST API and pulls JSON data for indexing into Splunk. The parameters of the API are start and end timestamps, for which the data is required. In order to avoid duplication, I am keeping the last_polled time as a checkpoint in my modular input so that on the next execution, the script knows from where to start fetching the data. This works great when the user creates only one input from the modular input but if the user creates another input to ingest the data in a separate other index, the script will be fetching the last_polled time from the first input as checkpoints are shared within a modular input so it will miss some data if their intervals are not the same.
Is there any technique to isolate checkpoints for each input so that they are not shared between them? Ideally, I would want them to be isolated according to the index and sourcetype defined by the user.
I hope I was able to clear my requirement clearly, let me know if you need more information on this. Will be very happy to receive some direction on this as the documentation has little information.
Regards,
Umair
... View more
Labels
- Labels:
-
Python
05-11-2020
02:38 PM
Hi @PavelP,
I don't have the manager.xml file because I am using the Add-on builder. Guess it doesn't use that file for creating configurations pages. All it created was four Python files.
... View more
05-11-2020
12:56 PM
Hi all,
I have created a modular input using Splunk's Add-on builder (v3.0.1). The modular input is based on a Python script which polls our REST API to ingest data into Splunk. The Modular input takes three Data Input Parameters, a simple text-box, a password and a checkbox.
What I want to do is, based on the data ingested by the script, disable or remove the checkbox input parameter so that user cannot edit it. Does Splunk modular inputs provide any such functionality to perform this?
Any help towards pointing me in the right direction will be highly appreciated.
Regards, Thanks
... View more
Labels
- Labels:
-
Python
05-11-2020
12:49 PM
1 Karma
Dear All,
I have created a new modular input using Splunk's Add-on builder (v3.0.1). The modular input is based on a Python script which polls our REST API to ingest data into Splunk. The Modular inputs takes three Data Input Parameters, a simple textbox, a password and a checkbox. I have observed that the checkbox parameter is not rendering properly when I configure the modular input from Splunk Settings -> Data Inputs. It shows the Checbox as a simple text field with default value of False (see image below):
But when I configure the modular input from within the add-on, it properly shows the checkbox field as below:
This is kind of a weird behavior. Is that the way Splunk is supposed to show the configuration in both cases or it is a bug? Please point me towards anything which can solve this.
Let me know if you need any more information to debug this.
Regards,
Umair
... View more
05-06-2020
12:33 PM
1 Karma
Hi Dear Splunkers,
I am trying to develop a Modular Input for our REST API which will ingest some data from our API through a python script implementation. The idea is simple. The modular input will poll our REST API after some interval, fetch the data, and index it into Splunk.
However, I am confused about the concept of single-instance and multiple-instance modular inputs. What I have understood is that single-instance modular inputs can be configured only once by the user and there is only one instance of the python script running at any point. Our API has the same type of data so there is no need for the user to configure multiple inputs otherwise, as the same data will be duplicated and indexed by Splunk which will be wasteful, I believe.
Can someone explain to me the major difference between both types in easy terms, and also suggest which type of modular input I should create for my use case?
Thanking you all for taking the time to read this.
Regards!
... View more
05-04-2020
11:43 AM
Hey, did you figure out a way to achieve this?
... View more
04-03-2020
04:39 AM
Hi @richgalloway and @anthonymelita,
Thanks for your responses. I do see the value in indexing data as well as the scheduled reports method but here is my concern: The stats from our APIs are given based on a few parameters provided by the user (e.g. timerange, usertype etc). Now, since we don't have any knowledge of what the user might input, we cannot make the REST API call without knowing his/her input first. Wouldn't the whole idea of indexing or scheduled reports, fail here? Let me know your thoughts on this.
Thanks again!
... View more
04-02-2020
07:30 AM
Hi Awesome People,
We are making a Splunk App for one of our products and the goal is to display the stats collected from that product's usage to the customer using that in the form of pretty dashboards. We have exposed all of those stats as REST APIs which can be used from anywhere with an API key authentication. So far so good.
Now here's a decision I cannot make and need your help in deciding. Which is the preferred method of achieving the above?
1- Use a modular input to poll our APIs and index the results in Splunk and then simply make use of Splunk's query language to get the stats from the indexed data.
2- Create custom search commands that communicate to our REST APIs and then use these custom commands in dashboards to render the data.
I don't have much experience with using Splunk so I don't know which one of the above options is less complex in terms of time, memory, storage. So, please guide me on which method should I better use?
Thanking you all for reading my query and helping me out in any way.
Regards,
Umair
... View more
01-02-2020
10:50 PM
I am seeing this behavior in Firefox. Also, Chrome is working fine as well.
... View more
01-02-2020
07:20 AM
When I run my custom search command, the results in Splunk's Statistics tab are appearing in a weird UI. The column and the "edit mark" icon are overlapped. Ideally, the column title shouldn't be overlapped with edit option. Is this due to the data of the command or that's an issue with Splunk? See attached screenshot for reference:
... View more
12-24-2019
03:52 AM
1 Karma
I am using searchbnf.conf file to provide help on my custom search commands but the search assistant is highlighting certain words from my description in green color which is not intended. How can I disable this or are there any escape characters I can use to ask Splunk to not highlight this?
Here's what my search assistant is showing:
And here is the entry in my searchbnf.conf file:
[snxapiquota-command]
syntax = snxapiquota
description = Find information about your API quota, like current usage, quota left etc.
example = | snxapiquota
usage = public
... View more
12-10-2019
07:52 AM
I have written my own custom generating command in Splunk which connects to our API and fetches threat details of a domain/ip. The syntax of the command is as follows:
| snxhostreputation host=
e.g. snxhostreputation host=www.google.com
This command generates one event for one domain but what I want to achieve is that, I should be able to pass multiple domains to this generating command and correspondingly generate events on each request to the API. The intended use-case is that users should be able to pass all domains present in their log data and get the information in the form of events. Now, as the generating command must be the very first command in a search, I cannot use any other command behind it to pass it data.
What can I do to achieve my use-case? So far, I have considered changing it to a streaming search command but I am not sure how would I achieve the same there as I also want the command to work for a single value as well as a list of values. Any tips to achieve this?
... View more
12-09-2019
10:45 PM
Thanks @LukeMurphey for validating my approach. The only thing I was not clear about was the CIM model. Can you point out to any examples that can help me normalize my API data with Splunk CIM?
... View more
12-09-2019
02:16 AM
Just put the library folder in your Splunk App's bin folder and that way you can access it in your app code via import statements.
... View more
12-06-2019
12:00 AM
The way I was currently going to approach this was as follows:
1- Create Custom SPL commands for each of our APIs
2- Create UI Dashboards for each indicator type (IP, Domain, URL)
3- Provide a TextInput in each dashboard where user can input the indicator value
4- Visualizations in each UI Dashboard which use our custom SPL commands to populate themselves with data from our server.
... View more
12-05-2019
11:36 PM
Hi @LukeMurphey,
Thanks for your informative comment. However, I am not sure if creating an alerts app would be the best use-case for our APIs. We are only looking to offer an additional source of information which users will use on their own. The required use case is that, a user wants threat information about an IP, Domain or URL indicator. Our app will provide a UI dashboard where he will enter that indicator value and will be presented with everything we have in form of nice dashboards.
If I go with alerts, the API will be triggered whenever there is an IP, Domain or URL indicator in the logs automatically. This is not what I am looking for rather the user should demand information for an indicator themselves. (For reference: I am looking to build something similar to PassiveTotal's app for Splunk: https://splunkbase.splunk.com/app/3083/)
I hope I was able to clarify the use case of our app, what are your views now?
... View more
12-05-2019
03:05 AM
Hi Everyone,
We are trying to develop an integration for Splunk based on our On-demand scanning APIs. We offer on-demand REST APIs to allow users to scan IPs, Domains and URLs indicators to get information such as Threat Posed by the indicator, Verdict on Indicator (Malicious/Benign), Screenshot of the Indicator's landing Page etc. Basically, it will be an enrichment application which users can use to enrich their existing threat information on a particular indicator.
I have done some R&D on Splunk and found out that the Splunk Enterprise is the top-level platform where as Splunk Enterprise Security is a application within that platform and specific to security and SIEM applications.
My question is that, whether I should develop a completely stand-alone separate application for Splunk Enterprise or try to integrate it with Splunk Enterprise Security application? I have a fairly good idea about how to develop Splunk Enterprise Standalone applications but little knowledge on how would I integrate our APIs with Splunk Enterprise Security since it is an already stand-alone application. Any important tips on which direction to take is what I am looking for. Thanks!
... View more