Class: Splunk::Pickaxe::Client
- Inherits:
-
Object
- Object
- Splunk::Pickaxe::Client
- Defined in:
- lib/splunk/pickaxe/client.rb
Instance Attribute Summary collapse
-
#alerts ⇒ Object
readonly
Returns the value of attribute alerts.
-
#dashboards ⇒ Object
readonly
Returns the value of attribute dashboards.
-
#eventypes ⇒ Object
readonly
Returns the value of attribute eventypes.
-
#field_extractions ⇒ Object
readonly
Returns the value of attribute field_extractions.
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(service, environment, config, args) ⇒ Client
constructor
A new instance of Client.
- #save_all ⇒ Object
- #sync_all ⇒ Object
Constructor Details
#initialize(service, environment, config, args) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/splunk/pickaxe/client.rb', line 15 def initialize(service, environment, config, args) @service = service @args = args @alerts = Alerts.new service, environment, config @dashboards = Dashboards.new service, environment, config @eventtypes = EventTypes.new service, environment, config @reports = Reports.new service, environment, config = Tags.new service, environment, config @field_extractions = FieldExtractions.new service, environment, config end |
Instance Attribute Details
#alerts ⇒ Object (readonly)
Returns the value of attribute alerts.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def alerts @alerts end |
#dashboards ⇒ Object (readonly)
Returns the value of attribute dashboards.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def dashboards @dashboards end |
#eventypes ⇒ Object (readonly)
Returns the value of attribute eventypes.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def eventypes @eventypes end |
#field_extractions ⇒ Object (readonly)
Returns the value of attribute field_extractions.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def field_extractions @field_extractions end |
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def reports @reports end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def service @service end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
13 14 15 |
# File 'lib/splunk/pickaxe/client.rb', line 13 def end |
Instance Method Details
#save_all ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/splunk/pickaxe/client.rb', line 36 def save_all overwrite = @args.fetch(:overwrite, false) @alerts.save overwrite @dashboards.save overwrite @eventtypes.save overwrite @reports.save overwrite # splunk-sdk doesn't seem to support iterating tags @field_extractions.save overwrite end |
#sync_all ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/splunk/pickaxe/client.rb', line 27 def sync_all @alerts.sync @dashboards.sync @eventtypes.sync @reports.sync .sync @field_extractions.sync end |