- Added support for basic authentication.
- Added an example for load balanced search heads.
- Added support for client certificates and path prefix.
- Added an option to specify a proxy server to use. Includes connect_via_proxy.rb example.
- Minor Fixes
- Splunk SDK for Ruby now works with Splunk 6.
- Fixed URL escaping of owners and apps in namespaces that contain special characters.
- Cosmetic changes to the repository only.
- Fixed Job#results to properly handle arguments.
- No bugs found during beta period.
- Fixed wrong version number in a few documentation files.
- The _raw field in events is now returned as text, not XML. That is, all tags such as the sg elements, are removed, and all characters are unescaped. The XML is available from the segmented_raw method on the event, which returns a string containing the raw XML of the _raw field returned by the server.
- The severities in messages in Atom feeds are now strings instead of symbols.
- Added support for inputs via the Service#inputs method, and for modular input kinds via the Service#modular_input_kinds method.
- Added segmented_raw method to events returned by ResultsReader.
- Added missing Splunk:: prefix in example in the docs for Service.
- Moved default "segmentation=none" option for asynchronous searches from Job#initialize to Job#events, Job#preview, and Job#results.
-
The Splunk SDK for Ruby now uses the same .splunkrc format as the other SDKs.
-
Moved
Service#connect
to being a static method of theSplunk
module, so you now call connect asservice = Splunk::connect(...)
instead of
service = Splunk::Service.connect(...)
-
aloader.rb and the
AtomResponseLoader
it contained have been replaced in their entirety by atomfeed.rb and theAtomFeed
class it contains. -
Changes to
Context
:- Removed
Context#post
,Context#delete
, andContext#get
. Replaced them all withContext#request
(which takes a structured specification of the resource) andContext#request_by_url
(which takes an already constructed URL to the resource). - Removed the methods
Context#fullpath
,Context#init_default
,Context#url
,Context#create_resource
,Context#check_for_error_return
,Context#build_stream
,Context#handle_key
,Context#flatten_params
, andContext#flatten_params_array
since simplification of the request infrastructure made them unnecessary. - Renamed
Context#protocol
toContext#scheme
to match correct naming in RFC.
- Removed
-
Removed the
parse
method fromService
, since it didn't actually parse the response in any useful way. -
Changes to naming of the configuration endpoints:
ConfCollection
renamed toConfigurationFile
(and conf_collection.rb renamed to configuration_file.rb).Conf
renamed toStanza
(and conf.rb renamed to stanza.rb).
-
Index#submit
andIndex#attach
now take hash arguments instead of positional arguments. -
Job#setttl
renamed toJob#set_ttl
. -
Job#setpriority
renamed toJob#set_priority
. -
Job#disable_preview
removed, since a working test scenario couldn't be found for it. -
Collection
's constructor arguments have changed. -
Entity
's constructor arguments have changed. -
SplunkError
has been removed, andSplunkHTTPError
has been made a direct subclass ofStandardError
. -
Deleted
SearchResults
, since it was superseded byResultsReader
. -
The metaprogramming to allow fetching entries of a
Hash
via dot notation has been removed. That is,hash.key
is no longer a synonym forhash["key"]
. -
The
urlencode
method previously monkeypatched ontoHash
has been removed. -
Service#create_collection
was removed.
- New examples in the /examples directory, showing how to:
- connect to Splunk
- manage entities in Splunk
- run searches and fetch their results from Splunk
- write data into Splunk
- The whole SDK now handles namespaces properly, and namespaces are first class objects. See the header comments of namespace.rb for a detailed description of Splunk namespaces and their representation in this SDK.
- All XML handling is shimmed to work with either Nokogiri or REXML. It tries
Nokogiri first, which can process XML vastly faster, and falls back to REXML,
which will be present in all Ruby installs. The user may all call
require_xml_library
to force the SDK to use a Nokogiri or REXML. See xml_shim.rb for all this behavior. - Added documentation throughout the SDK.
- The unit testing suite has been completely rewritten and expanded.
- Added a
ResultsReader
class to parse and iterate over sets of XML results from search jobs. - Added methods to
Context
:host
port
token
username
password
namespace
server_accepting_connections?
Context#restart
takes an optional timeout, and properly handles waiting for Splunk to restart.- Added convenience methods to
Service
to create searches:create_oneshot
create_search
create_stream
- Added methods to
Service
:splunk_version
saved_searches
- New features added to
Collection
:Collection#each
, when called without a block, now returns an enumerator over all elements in the collection.- Added an optional namespace argument to
Collection#delete
andCollection#fetch
so entities can be specified uniquely even in the presence of name collisions. - Added new methods to
Collection
, mostly designed to recapitulate the relevant methods ofHash
. In the notation below, synonym sets are separated by slashes, and names in a set of synonyms that already existed are surrounded by square brackets:[contains?]/has_key?/include?/key?/member?
[list]/values/to_a
each_key
each_pair
empty?
entity_class
fetch/[ [] ]
keys
length
resource
service
- Added methods to
Entity
. In the notation below, synonym sets are separated by slashes, and names in a set of synonyms that already existed are surrounded by square brackets:content
delete
fetch/[ [] ]
links
namespace
refresh
resource
service
- Entities now cache their state. To update the cache, call the entity's
refresh
method. Index#clean
takes a timeout instead of waiting forever. If no timeout is specified, a default value will be used.- Added new methods to
Job
. In the notation below, synonym sets are separated by slashes, and names in a set of synonyms that already existed are surrounded by square brackets:control
is_done?
is_ready?
sid
- Added saved search support, accessible via
Service#saved_searches
.SavedSearch
entities have the following additional methods beyondEntity
:dispatch
history
- Added the following methods to
Stanza
(was:Conf
). In the notation below, synonym sets are separated by slashes, and names in a set of synonyms that already existed are surrounded by square brackets:length
update/[submit]
- Added new custom exceptions:
AmbiguousEntityReference
, for when a fetch of an entity by name would return multiple entities due to name collisions.EntityNotReady
, raised when a program tries to fetch the state of an entity which is queued for creation, but not yet created, such as a search job that is not yet ready.IllegalOperation
, raised by a program when an operation known statically not to work, such as deleting an index on Splunk 4.x, is called.
Job
is now a subclass ofEntity
.Service
is now a subclass ofContext
instead of including theContext
as an instance variable.- Removed dependence of
Context
(and the SDK) on the librariesnetrc
,pathname
, andrest-client
. Now it uses only the standard library plus (optionally) Nokogiri. - Reorganized directory structure of the SDK.
- The contents of
lib/splunk-sdk-ruby/client/
have been moved tolib/splunk-sdk-ruby
, and client.rb has been deleted. - jobs.rb was moved to
lib/splunk-sdk-ruby/collection/
- job.rb was moved to
lib/splunk-sdk-ruby/entity/
- The contents of
- Made all unit test filenames start with test_ instead of tc_.