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.
-
#macros ⇒ Object
readonly
Returns the value of attribute macros.
-
#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.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/splunk/pickaxe/client.rb', line 16 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 @macros = Macros.new service, environment, config @reports = Reports.new service, environment, config @tags = 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.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def alerts @alerts end |
#dashboards ⇒ Object (readonly)
Returns the value of attribute dashboards.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def dashboards @dashboards end |
#eventypes ⇒ Object (readonly)
Returns the value of attribute eventypes.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def eventypes @eventypes end |
#field_extractions ⇒ Object (readonly)
Returns the value of attribute field_extractions.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def field_extractions @field_extractions end |
#macros ⇒ Object (readonly)
Returns the value of attribute macros.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def macros @macros end |
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def reports @reports end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def service @service end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
14 15 16 |
# File 'lib/splunk/pickaxe/client.rb', line 14 def @tags end |
Instance Method Details
#save_all ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/splunk/pickaxe/client.rb', line 39 def save_all overwrite = @args.fetch(:overwrite, false) local_save = @args.fetch(:local_save, false) @alerts.save overwrite, local_save @dashboards.save overwrite, local_save @eventtypes.save overwrite, local_save @macros.save overwrite, local_save @reports.save overwrite, local_save # splunk-sdk doesn't seem to support iterating tags @field_extractions.save overwrite, local_save end |
#sync_all ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/splunk/pickaxe/client.rb', line 29 def sync_all @alerts.sync @dashboards.sync @eventtypes.sync @macros.sync @reports.sync @tags.sync @field_extractions.sync end |