Class: Puppet::Node::Facts::SecurityBaseline
- Inherits:
-
Yaml
- Object
- Yaml
- Puppet::Node::Facts::SecurityBaseline
- Includes:
- Util::SecurityBaseline
- Defined in:
- lib/puppet/indirector/facts/security_baseline.rb
Overview
Logstash Facts
Instance Method Summary collapse
Instance Method Details
#profile(message, metric_id, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/puppet/indirector/facts/security_baseline.rb', line 13 def profile(, metric_id, &block) = 'Security_baseline: ' + # Puppet.info "Message: #{message}" arity = Puppet::Util::Profiler.method(:profile).arity case arity when 1 Puppet::Util::Profiler.profile(, &block) when 2, -2 Puppet::Util::Profiler.profile(, metric_id, &block) end end |
#save(request) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/puppet/indirector/facts/security_baseline.rb', line 25 def save(request) # yaml cache goes first super(request) Puppet.info "Security_baseline indirector save #{request.key}" profile('security_baseline_facts#save', [:security_baseline, :facts, :save, request.key]) do begin # Puppet.info "Submitting facts to Logstash #{request.to_json} |" current_time = Time.now send_facts(request, current_time.clone.utc) rescue StandardError => e Puppet.err "Could not send security_baseline facts to Logstash: #{e}\n#{e.backtrace}" end end end |