This file contains 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
[{ | |
"id": "6ffd9e9e.4b3ea", | |
"type": "tab", | |
"label": "Flow 1" | |
}, { | |
"id": "d14dd126.35451", | |
"type": "ttn app", | |
"z": "", | |
"appId": "matthewskelton-wutheringbytes-2017", | |
"region": "eu", |
This file contains 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
# From https://github.com/opscode/ohai/blob/master/lib/ohai/plugins/windows/uptime.rb e803a3f | |
require 'ruby-wmi' | |
provides "uptime", "uptime_seconds" | |
uptime_seconds ::WMI::Win32_PerfFormattedData_PerfOS_System.find(:first).SystemUpTime.to_i | |
uptime self._seconds_to_human(uptime_seconds) |
This file contains 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
C:\>sc config winmgmt start= demand | |
[SC] ChangeServiceConfig SUCCESS | |
C:\>sc stop winmgmt | |
SERVICE_NAME: winmgmt | |
STATE : 3 STOP_PENDING | |
... | |
C:\>winmgmt /salvagerepository %windir%\System32\wbem | |
WMI repository has been salvaged |
This file contains 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
[2013-07-04T11:29:12+01:00] DEBUG: Loading plugin windows::uptime | |
[2013-07-04T11:29:12+01:00] DEBUG: Plugin windows::uptime threw exception #<WIN32OLERuntimeError: (in OLE method `ConnectServer': ) | |
OLE error code:80041002 in SWbemLocator | |
Not found | |
HRESULT error code:0x80020009 | |
Exception occurred.> C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rdp-ruby-wmi-0.3.1/lib/ruby-wmi/base.rb:131 | |
:in `method_missing' | |
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rdp-ruby-wmi-0.3.1/lib/ruby-wmi/base.rb:131:in `connection' | |
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rdp-ruby-wmi-0.3.1/lib/ruby-wmi/base.rb:47:in `find_by_wql' |
This file contains 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
require 'Graphite' | |
require 'Logger' | |
# Change these as needed for your environment | |
server = "my.graphite.server.url" | |
log = Logger.new(STDOUT) | |
prefix = "Test.Me.XmasTree." | |
# Create the logger to send stats to Graphite with specific timings | |
logger = Graphite::Logger.new(server,log) |