Hello,
So I have written a very simple Django app that displays a basic HTML and CSS webpage. The only reference to splunk is "{% load splunkmvc %}" at the top of my home.html. What I want is the ability to perform searches on this page and display the results in plain text only, no splunk formatting or styling at all.
Right now If I add a query in the {% block managers%} section and reference that query in the HTML I get no results. However, If I add {% extends "splunkdj:base_with_basic_styles.html" %} then the query will work and return results...only they are formated by splunk. Rather than just giving me the single value I want it generates several div's nested in each other and imposes several CSS classes on them from some place I've never referenced producing a large box on my webpage with bold text displaying the result.
What are the bare minimum requirements to perform a splunk search? (ie. a couple JavaScript files I could include in the {% block js %} or something of the sort)
Is this even possible?
Thanks
Here is my search:
{% block managers%}
{% searchmanager
id="search_total"
search="| metadata type=sourcetypes index=* | stats sum(totalCount)"
%}
{% endblock managers%}
Here is how I reference it within the body of the HTML:
{% single id="total" managerid="search_total" %} total events.
This is what I have to add to the HTML to get results (also produces undesired formatting):
{% extends "splunkdj:base_with_basic_styles.html" %}
You can do the entire search manager creation and result handling with Javascript. You should check out this overview and from there do the tutorials on the right to see how it works.
You can do the entire search manager creation and result handling with Javascript. You should check out this overview and from there do the tutorials on the right to see how it works.
Thank you much for your reply. I will look into this as work allows.
Update: Much appreciated! This appears to be exactly what I was looking for. I'm not sure how I missed it during my documentation perusing.