diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..b17ad40 --- /dev/null +++ b/.mdlrc @@ -0,0 +1,2 @@ +# https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md +rules "~MD013", "~MD022", "~MD024", "~ND032" diff --git a/.rubocop.yml b/.rubocop.yml index 2629f7d..48efefc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml # Support all non EOL rubies AllCops: - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.4 MethodLength: Max: 200 diff --git a/CHANGELOG.md b/CHANGELOG.md index b8415fe..c257e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Change Log + This project adheres to [Semantic Versioning](http://semver.org/). -This CHANGELOG follows the format listed at [Our CHANGELOG Guidelines ](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md). +This CHANGELOG follows the format listed at [Our CHANGELOG Guidelines](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md). Which is based on [Keep A Changelog](http://keepachangelog.com/) ## [Unreleased] + ### Changes +- update powershell checks to provide the proper exitcode (@derekgroh) - update tests to favor Pester instead of Ruby (@derekgroh) ### Breaking Changes - update metrics-windows-network.ps1 -Interface argument handling to work with Interfaces names that contain underscores diff --git a/README.md b/README.md index e37e60d..dcc5cd5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Sensu-Plugins-Windows +# Sensu-Plugins-Windows [![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-windows.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-windows) [![Gem Version](https://badge.fury.io/rb/sensu-plugins-windows.svg)](http://badge.fury.io/rb/sensu-plugins-windows) @@ -13,44 +13,43 @@ These files provide basic Checks and Metrics for a Windows system. ### Ruby - * bin/check-windows-cpu-load.rb - * bin/check-windows-disk.rb - * bin/check-windows-process.rb - * bin/check-windows-processor-queue-length.rb - * bin/check-windows-ram.rb - * bin/check-windows-service.rb - * bin/metric-windows-cpu-load.rb - * bin/metric-windows-disk-usage.rb - * bin/metric-windows-network.rb - * bin/metric-windows-processor-queue-length.rb - * bin/metric-windows-ram-usage.rb - * bin/metric-windows-uptime.rb - * bin/powershell_helper.rb +* bin/check-windows-cpu-load.rb +* bin/check-windows-disk.rb +* bin/check-windows-process.rb +* bin/check-windows-processor-queue-length.rb +* bin/check-windows-ram.rb +* bin/check-windows-service.rb +* bin/metric-windows-cpu-load.rb +* bin/metric-windows-disk-usage.rb +* bin/metric-windows-network.rb +* bin/metric-windows-processor-queue-length.rb +* bin/metric-windows-ram-usage.rb +* bin/metric-windows-uptime.rb +* bin/powershell_helper.rb ### Powershell - * bin/check-windows-cpu-load.ps1 - * bin/check-windows-disk.ps1 - * bin/check-windows-disk-writeable.ps1 - * bin/check-windows-pagefile.ps1 - * bin/check-windows-process.ps1 - * bin/check-windows-processor-queue-length.ps1 - * bin/check-windows-ram.ps1 - * bin/check-windows-service.ps1 - * bin/metric-windows-cpu-load.ps1 - * bin/metric-windows-disk-usage.ps1 - * bin/metric-windows-network.ps1 - * bin/metric-windows-processor-queue-length.ps1 - * bin/metric-windows-ram-usage.ps1 - * bin/metric-windows-uptime.ps1 - * bin/check-windows-directory.ps1 - * bin/check-windows-event-log.ps1 - * bin/check-windows-log.ps1 - +* bin/check-windows-cpu-load.ps1 +* bin/check-windows-disk.ps1 +* bin/check-windows-disk-writeable.ps1 +* bin/check-windows-pagefile.ps1 +* bin/check-windows-process.ps1 +* bin/check-windows-processor-queue-length.ps1 +* bin/check-windows-ram.ps1 +* bin/check-windows-service.ps1 +* bin/metric-windows-cpu-load.ps1 +* bin/metric-windows-disk-usage.ps1 +* bin/metric-windows-network.ps1 +* bin/metric-windows-processor-queue-length.ps1 +* bin/metric-windows-ram-usage.ps1 +* bin/metric-windows-uptime.ps1 +* bin/check-windows-directory.ps1 +* bin/check-windows-event-log.ps1 +* bin/check-windows-log.ps1 ## Usage -##### Example 1: +### Example 1 Execute Powershell functions using the helper (No copy needed), see example below: @@ -61,53 +60,39 @@ Execute Powershell functions using the helper (No copy needed), see example belo "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\embedded\\bin\\powershell_helper.rb check-windows-ram.ps1 90 95", "interval": 30, "type": "check", - "handler": "win_metrics", - "subscribers": ["win_metrics"] + "handler": "win_memory", + "subscribers": ["win_memory"], + "runtime_assets": ["sensu-plugins-windows", "sensu-ruby-runtime"] } } } ``` -##### Example 2: - -- Copy either the Ruby or Powershell files on a Sensu Client, typically under C:\etc\sensu\plugins. +### Example 2 -- You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below: +Execute Powershell functions directly, see example below: ```json { "checks": { "cpu_percent": { - "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb", + "command": "Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File check-windows-ram.ps1 90 95", "interval": 30, "type": "metric", "handler": "win_metrics", - "subscribers": ["win_metrics"] + "subscribers": ["win_metrics"], + "runtime_assets": ["sensu-plugins-windows"] } } } ``` -You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below: - -```json -{ - "checks": { - "cpu_percent": { - "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb", - "interval": 30, - "type": "metric", - "handler": "win_metrics", - "subscribers": ["win_metrics"] - } - } -} -``` - ## Dependencies - * Powershell checks require Powershell version 3.0 or higher. + +* Powershell checks require Powershell version 3.0 or higher. ## Troubleshooting + * Failures to pull counter data with messages like below, might be due to corrupt performance counters. See [Here](https://support.microsoft.com/en-us/help/2554336/how-to-manually-rebuild-performance-counters-for-windows-server-2008-6) for more information. Short answer on fix is `lodctr /R` in an Admin elevated command prompt `Check failed to run: undefined method length' for nil:NilClass, "c:/opt/sensu/plugins/check-windows-ram.rb:45:inacquire_ram_usage'", "c:/opt/sensu/plugins/check-windows-ram.rb:54:in run'", "c:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-1.` @@ -148,4 +133,4 @@ Invoke-Pester ## Installation -[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html) +[Install Sensu plugins](https://docs.sensu.io/sensu-go/latest/plugins/install-plugins/) diff --git a/bin/check-windows-cpu-load.ps1 b/bin/check-windows-cpu-load.ps1 index 54b1608..79ea71d 100644 --- a/bin/check-windows-cpu-load.ps1 +++ b/bin/check-windows-cpu-load.ps1 @@ -34,29 +34,34 @@ Param( [int]$CRITICAL ) -. (Join-Path $PSScriptRoot perfhelper.ps1) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" -$perfCategoryID = Get-PerformanceCounterByID -Name 'Processor Information' -$perfCounterID = Get-PerformanceCounterByID -Name '% Processor Time' - -$localizedCategoryName = Get-PerformanceCounterLocalName -ID $perfCategoryID -$localizedCounterName = Get-PerformanceCounterLocalName -ID $perfCounterID - -$Value = [System.Math]::Round((Get-Counter "\$localizedCategoryName(_total)\$localizedCounterName" -SampleInterval 1 -MaxSamples 1).CounterSamples.CookedValue) +$Value = [System.Math]::Round((Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue) If ($Value -ge $CRITICAL) { Write-Host CheckWindowsCpuLoad CRITICAL: CPU at $Value%. - Exit 2 } + ExitWithCode 2 +} If ($Value -ge $WARNING) { Write-Host CheckWindowsCpuLoad WARNING: CPU at $Value%. - Exit 1 + ExitWithCode 1 } Else { Write-Host CheckWindowsCpuLoad OK: CPU at $Value%. - Exit 0 + ExitWithCode 0 } diff --git a/bin/check-windows-directory.ps1 b/bin/check-windows-directory.ps1 index 9ccb52a..441eea3 100644 --- a/bin/check-windows-directory.ps1 +++ b/bin/check-windows-directory.ps1 @@ -21,13 +21,25 @@ Param( [string]$Dir ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} + $ThisDir = Test-Path -Path $Dir #Shows diretory if it exist if ($ThisDir) { "CheckDirectory OK: Directory exist" - EXIT 0 + ExitWithCode 0 }else { "CheckDirectory CRITICAL: Directory doesn't exist" - EXIT 2 + ExitWithCode 2 } diff --git a/bin/check-windows-disk.ps1 b/bin/check-windows-disk.ps1 index 660f3f4..764715c 100644 --- a/bin/check-windows-disk.ps1 +++ b/bin/check-windows-disk.ps1 @@ -14,7 +14,7 @@ # Powershell 3.0 or above # # USAGE: -# Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File C:\\etc\\sensu\\plugins\\check-windows-disk.ps1 90 95 ab +# Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File check-windows-disk.ps1 -Warning 90 -Critical 95 # # NOTES: # @@ -38,13 +38,28 @@ Param( [string]$IGNORE ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} + +# Set the process priority $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" +# Set $IGNORE and $INCLUDE values if not provided. If ($IGNORE -eq "") { $IGNORE = "ab" } +# Select all fixed local disks (3) which are $INCLUDE and not $IGNORE $AllDisks = Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType = 3" | Where-Object { $_.DeviceID -notmatch "[$IGNORE]:"} $crit = 0 @@ -70,15 +85,15 @@ foreach ($ObjDisk in $AllDisks) { if ($crit -ne 0) { if ($warn -ne 0 ){ - Write-Host "CheckDisk CRITICAL: $crit disks in critical state `n$critDisks;`n$warn disks in warning state:`n$warnDisks" + Write-Host "CheckDisk CRITICAL: $crit disks in critical state `n$critDisks;`nCheckDisk WARNING: $warn disks in warning state:`n$warnDisks" } else { Write-Host "CheckDisk CRITICAL: $crit disks in critical state `n$critDisks" } - exit 2 + ExitWithCode 2 } elseif ($warn -ne 0) { Write-Host "CheckDisk WARNING: $warn disks in warning state `n$warnDisks" - exit 1 + ExitWithCode 1 } Write-Host "CheckDisk OK: All disk usage under $WARNING%." -Exit 0 \ No newline at end of file +ExitWithCode 0 diff --git a/bin/check-windows-event-log.ps1 b/bin/check-windows-event-log.ps1 index 18df4f1..8d81053 100644 --- a/bin/check-windows-event-log.ps1 +++ b/bin/check-windows-event-log.ps1 @@ -26,6 +26,17 @@ Param( [string]$Pattern ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} #Search for pattern inside of File $ThisEvent = Get-WinEvent $LogName -ErrorAction SilentlyContinue | Where {$_.Message -like "*$($Pattern)*"} @@ -40,12 +51,12 @@ $CountWarns=($ThisEvent | Where{$_.LevelDisplayName -eq 'Warning'}).count #Prints count of how many ciritials and warnings If($CountCrits -eq 0 -And $CountWarns -eq 0){ "CheckLog OK: $CountCrits criticals $CountWarns warnings" - EXIT 0 + ExitWithCode 0 }ElseIF ($CountCrits -gt 0) { "CheckLog CRITICAL: $CountCrits criticals $CountWarns warnings" - EXIT 2 + ExitWithCode 2 } Else { "CheckLog WARNING: $CountCrits criticals $CountWarns warnings" - EXIT 1 + ExitWithCode 1 } diff --git a/bin/check-windows-http.ps1 b/bin/check-windows-http.ps1 index e49fa38..200b6e6 100644 --- a/bin/check-windows-http.ps1 +++ b/bin/check-windows-http.ps1 @@ -29,6 +29,18 @@ Param( [string]$CheckAddress ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} + $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -48,9 +60,9 @@ if (!$Available) { if ($Available) { if ($Available.statuscode -eq 200) { Write-Host OK: $CheckAddress is available! - Exit 0 + ExitWithCode 0 } else { Write-Host CRITICAL: URL $CheckAddress is not accessible! - Exit 2 + ExitWithCode 2 } } diff --git a/bin/check-windows-log.ps1 b/bin/check-windows-log.ps1 index 56a43d5..322f25e 100644 --- a/bin/check-windows-log.ps1 +++ b/bin/check-windows-log.ps1 @@ -25,16 +25,26 @@ Param( [Parameter(Mandatory=$True)] [string]$Pattern ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + $host.SetShouldExit($exitcode) + exit +} #Search for pattern inside of File $ThisLog = Select-String -Path $LogPath -Pattern $Pattern -AllMatch #Show matched lines if they exist If($ThisLog -eq $null ){ "CheckLog OK: The pattern doesn't exist in log" - EXIT 0 + ExitWithCode 0 }else{ $ThisLog "CheckLog CRITICAL" - EXIT 2 + ExitWithCode 2 } diff --git a/bin/check-windows-pagefile.ps1 b/bin/check-windows-pagefile.ps1 index ecf651f..90f90dc 100644 --- a/bin/check-windows-pagefile.ps1 +++ b/bin/check-windows-pagefile.ps1 @@ -34,6 +34,17 @@ Param( [int]$CRITICAL ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -44,12 +55,12 @@ $ThisProcess.PriorityClass = "BelowNormal" If ($Value -gt $CRITICAL) { Write-Host CheckWindowsPagefile CRITICAL: Pagefile usage at $Value%. - Exit 2 } + ExitWithCode 2 } If ($Value -gt $WARNING) { Write-Host CheckWindowsPagefile WARNING: Pagefile usage at $Value%. - Exit 1 } + ExitWithCode 1 } Else { Write-Host CheckWindowsPagefile OK: Pagefile usage at $Value%. - Exit 0 } + ExitWithCode 0 } diff --git a/bin/check-windows-process.ps1 b/bin/check-windows-process.ps1 index 0373b47..3124f1f 100644 --- a/bin/check-windows-process.ps1 +++ b/bin/check-windows-process.ps1 @@ -30,6 +30,17 @@ Param( [string]$ProcessName ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -37,8 +48,8 @@ $Exists = Get-Process $ProcessName -ErrorAction SilentlyContinue If (!$Exists) { Write-Host CRITICAL: $ProcessName not found! - Exit 2 } + ExitWithCode 2 } If ($Exists) { Write-Host OK: $ProcessName running. - Exit 0 } + ExitWithCode 0 } diff --git a/bin/check-windows-processor-queue-length.ps1 b/bin/check-windows-processor-queue-length.ps1 index 23fc233..d36e09a 100644 --- a/bin/check-windows-processor-queue-length.ps1 +++ b/bin/check-windows-processor-queue-length.ps1 @@ -34,6 +34,18 @@ Param( [int]$CRITICAL ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} + $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -41,12 +53,12 @@ $Value = (Get-CimInstance -className Win32_PerfFormattedData_PerfOS_System).Proc If ($Value -gt $CRITICAL) { Write-Host CheckWindowsProcessorQueueLength CRITICAL: Processor Queue at $Value. - Exit 2 } + ExitWithCode 2 } If ($Value -gt $WARNING) { Write-Host CheckWindowsProcessorQueueLength WARNING: Processor Queue at $Value. - Exit 1 } + ExitWithCode 1 } Else { Write-Host CheckWindowsProcessorQueueLength OK: Processor Queue at $Value. - Exit 0 } + ExitWithCode 0 } diff --git a/bin/check-windows-ram.ps1 b/bin/check-windows-ram.ps1 index 319d4f3..e6c24cb 100644 --- a/bin/check-windows-ram.ps1 +++ b/bin/check-windows-ram.ps1 @@ -34,6 +34,17 @@ Param( [int]$CRITICAL ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -43,12 +54,12 @@ $Value = [System.Math]::Round(((($Memory.TotalVisibleMemorySize-$Memory.FreePhys If ($Value -ge $CRITICAL) { Write-Host CheckWindowsRAMLoad CRITICAL: RAM at $Value%. - Exit 2 } + ExitWithCode 2 } If ($Value -ge $WARNING) { Write-Host CheckWindowsRAMLoad WARNING: RAM at $Value%. - Exit 1 } + ExitWithCode 1 } Else { Write-Host CheckWindowsRAMLoad OK: RAM at $Value%. - Exit 0 } + ExitWithCode 0 } diff --git a/bin/check-windows-service.ps1 b/bin/check-windows-service.ps1 index 3619058..b8d2f08 100644 --- a/bin/check-windows-service.ps1 +++ b/bin/check-windows-service.ps1 @@ -31,6 +31,17 @@ Param( [string]$ServiceName ) +# Function to help the exitcode be seen by Sensu +function ExitWithCode +{ + param + ( + $exitcode + ) + + $host.SetShouldExit($exitcode) + exit +} $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" @@ -39,13 +50,13 @@ $Exists = Get-Service $ServiceName -ErrorAction SilentlyContinue If ($Exists) { If (($Exists).Status -eq "Running") { Write-Host OK: $ServiceName Running. - Exit 0 } + ExitWithCode 0 } If (($Exists).Status -eq "Stopped") { Write-Host CRITICAL: $ServiceName Stopped. - Exit 2 } + ExitWithCode 2 } } If (!$Exists) { Write-Host CRITICAL: $ServiceName not found! - Exit 2 } + ExitWithCode 2 } diff --git a/bin/metric-windows-cpu-load.ps1 b/bin/metric-windows-cpu-load.ps1 index 6b4fa82..15c8ac1 100644 --- a/bin/metric-windows-cpu-load.ps1 +++ b/bin/metric-windows-cpu-load.ps1 @@ -30,8 +30,6 @@ param( $ThisProcess = Get-Process -Id $pid $ThisProcess.PriorityClass = "BelowNormal" -. (Join-Path $PSScriptRoot perfhelper.ps1) - if ($UseFullyQualifiedHostname -eq $false) { $Path = ($env:computername).ToLower() }else { @@ -52,7 +50,7 @@ foreach ($counter in $counters) { $perfCounterID = Get-PerformanceCounterByID -Name $counter $localizedCounterName = Get-PerformanceCounterLocalName -ID $perfCounterID -$value = [System.Math]::Round((Get-Counter "\$localizedCategoryName(_total)\$localizedCounterName" -SampleInterval 1 -MaxSamples 1).CounterSamples.CookedValue) +$value = [System.Math]::Round((Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue) $Time = DateTimeToUnixTimestamp -DateTime (Get-Date) diff --git a/sensu-plugins-windows.gemspec b/sensu-plugins-windows.gemspec index dcd6e76..50f8dfe 100644 --- a/sensu-plugins-windows.gemspec +++ b/sensu-plugins-windows.gemspec @@ -15,16 +15,18 @@ Gem::Specification.new do |s| s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md] s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-windows' s.license = 'MIT' - s.metadata = { 'maintainer' => 'sensu-plugin', - 'development_status' => 'active', - 'production_status' => 'unstable - testing recommended', - 'release_draft' => 'false', - 'release_prerelease' => 'false' } + s.metadata = { + 'maintainer' => 'sensu-plugin', + 'development_status' => 'active', + 'production_status' => 'unstable - testing recommended', + 'release_draft' => 'false', + 'release_prerelease' => 'false' + } s.name = 'sensu-plugins-windows' s.platform = Gem::Platform::RUBY s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu' s.require_paths = ['lib'] - s.required_ruby_version = '>= 2.3.0' + s.required_ruby_version = '>= 2.4.0' s.summary = 'Sensu plugins for Windows' s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.version = SensuPluginsWindows::Version::VER_STRING @@ -38,6 +40,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake', '~> 13.0' s.add_development_dependency 'redcarpet', '~> 3.2' s.add_development_dependency 'rspec', '~> 3.1' - s.add_development_dependency 'rubocop', '~> 0.81.0' + s.add_development_dependency 'rubocop', '~> 0.80.1' s.add_development_dependency 'yard', '~> 0.9.11' end diff --git a/test/check-windows-disk.rb b/test/check-windows-disk.rb index 047269f..b12caed 100644 --- a/test/check-windows-disk.rb +++ b/test/check-windows-disk.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../bin/check-windows-disk.rb' +require_relative '../bin/check-windows-disk' describe CheckDisk do before(:all) do diff --git a/test/check-windows-service_spec.rb b/test/check-windows-service_spec.rb index e2637ce..7d31d32 100644 --- a/test/check-windows-service_spec.rb +++ b/test/check-windows-service_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../bin/check-windows-service.rb' +require_relative '../bin/check-windows-service' describe CheckWinService do before(:all) do