This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #This will have Puppet send it's changes to Graphite and mark a vertical line on any graph you create to show when the change was made and make it easy to correlate before and after utilization. | |
| require 'puppet' | |
| require 'yaml' | |
| require 'socket' | |
| require 'time' | |
| Puppet::Reports.register_report(:graphite_event) do | |
| configfile = File.join([File.dirname(Puppet.settings[:config]), "graphite_event.yaml"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #This fact will pull the Splunk Universal Forwarder version and then normalize it so you can use versioncmp in Puppet to update your Splunk Universal Forwarders. | |
| #Splunk Universal Forwarder Version | |
| Facter.add("SplunkUF_Version") do | |
| confine :osfamily => "RedHat" | |
| setcode do | |
| SplunkUF_Version = Facter::Util::Resolution.exec("/opt/splunkforwarder/bin/splunk --version | awk {'print $4'}") | |
| if SplunkUF_Version.length < 5 |
NewerOlder