Refine your search:

5
4

In the Advanced XML, it is unclear to me what an intention is. It seems to me that it is an object that modifies a search that it in it's path in the module hierarchy, and that it is created by a "ConvertToIntention" module. Possibly they can be implicitly created by other modules.

I would simply like to know how to use ConvertToIntention to modify a search. It is severely under-documented in the developer documentation, given its apparent importance.

A couple of questions:

  • What is being converted to an intention? It looks like it is something called "Settings". What are these? Where do they come from? How can they be created, and how might I know about which ones exist at any given time?

  • How to I specify an intention to convert to? It appears that an "intention" is specified as some object, but there is no documentation about what types exist (I have seen "addterm" and "stringreplace"), and more importantly, what subitems may or must be specified inside them. And of course, what the subitems mean for each intention type.

In general, while the Advanced XML module docs (e.g., http://localhost:8000/modules ) list out the names of parameters, I have not been able to find any documentation or description of:

  • What other objects or context are or may be passed down (or up or whatever) from module to child module. There are obviously many more "things" being passed around than just the explicit parameters.
  • How these objects might affect what the module does.

"Intentions" and "Settings" are just two of these objects (or whatever they are). It seems that "Searches" and possibly "Results" or "Events" or something like that might be other objects. I think the Advanced XML might be rather less obscure if this information were available somewhere.

asked 17 Aug '10, 16:55

gkanapathy's gravatar image

gkanapathy ♦
26.4k1622
accept rate: 42%

edited 17 Aug '10, 17:17


2 Answers:

I'll step into the frying pan here. The best explanation about how to work with the 'form search' modules, aka the 'lister' modules, is in the ui_examples app which is available on splunkbase.

The fact of the matter is that the developer docs on really practical app-development topics like this (and some other topics) may be lagging behind the ui_examples app. So there are docs pages that talk about intentions, but they dont answer any of these questions of yours. ( http://www.splunk.com/base/Documentation/4.1.4/Developer/AdvancedIntro ) the ui_examples app does however.

Almost all the 60 or so dashboards and form search examples in ui_examples use splunk's internal metrics data so you'll be able to see the examples working and you can experiment with them to learn how different params work for yourself.

link

answered 18 Aug '10, 23:47

nick's gravatar image

nick ♦
14.2k1318
accept rate: 46%

Alright. You knew you were stepping into something. I will note that there is hardly any documentation on intentions. Only "addterm" and "stringreplace" exist in examples, and that is the extent of the documentation of them. It seems there is no reference on the parameters or behavior of specific intentions. There are mentions in some of the example text to the existence of many more intentions, none of which are documented in any way. There is no indication (except via implication) of which modules create/modify/destroy intentions, and which create/modify/destroy settings.

(19 Aug '10, 15:01) gkanapathy ♦

The UI examples, while helpful, do not provide this information, except via example. It turns out that the XML is inconsistent and sensitive, so if you want to do something that happens to deviate from the examples in certain ways, there is no way to know how (or even whether) it can be done. It seems to me that a minimum for a development framework should at least be a complete object reference.

(19 Aug '10, 15:05) gkanapathy ♦

I completely agree. I created the ui_examples app to fill the short- and medium-term need, and while some documentation has been pulled into the docs from it, deeper layers have not. For a while now, and underneath the module-level, we have had a large and increasingly stable body of code that amounts to a splunk client-side SDK, but whether that's a good thing, what exactly splunk should do with it and how/whether to document it -- these have been unsolved and largely unaddressed problems.

(19 Aug '10, 18:09) nick ♦

So this posting is out there since August 2010, I hope there is better documentation that I am having difficulty finding. Does anyone have any documentation on the above question. I am having the same difficulty.

(18 Apr '11, 13:53) approachct

In the meantime, you might want to take a look at the following file:

$SPLUNK_HOME/lib/python2.6/site-packages/splunk/search/Transformer.py

It seems to be responsible for the transforming part on the serverside when intentions are applied and might give you some insights on what's going on in the background.

link

answered 29 Nov '10, 16:28

ziegfried's gravatar image

ziegfried ♦
7.1k1315
accept rate: 53%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×161
×117
×96
×37

Asked: 17 Aug '10, 16:55

Seen: 1,367 times

Last updated: 18 Apr '11, 13:53

Copyright © 2005-2012 Splunk, Inc. All rights reserved.