Nagios Exchange
  • Home
  • Directory
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
Plugins4387Themes and Skins11Add-ons732Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Notifications PagerDuty Bi Directional integration v3
0.0 (0)
1.6K
RSS Feed
Newest Listings Updated Listings
Top Contributors
LAMY (7)Julien DESMAREST (6)deskwork_itunes142 (4)Davide Lemma (4)Joerg Hoerter (3)
See More
Newest Contributors
Guillaume8723 (1)Salvo (1)SOHA-IT (1)Tsvetomir Tsvetanov (1)Igor Ru (1)
See More
Home > pintxoj
p

pintxoj

@pintxoj

User Stats

Favorites0

Views

Projects0

No Projects Found
Check_Temperature

SEMI FIX

For those who try this script and always send Critical to nagios i made this fix and it works now. Look at the bottom of the script and search for this: if (intMaxTemp = intTemperatureWarning) then return_code = WARNING if (intMaxTemp >= intTemperatureCritical) then return_code = CRITICAL if (intMaxTemp = cstr(intTempCritical)) then return_code = 2 if (intMaxTemp rning = 55 intTempCritical = 70 Change that values as you need. Now the script works, as i say, without arguments, but with my knowledge of scripting is quite more than nothing.

Reviewed 11 years ago

check_folder_size.vbs

Fix

Here is a little fix to this plugin. First fixed the Warinig and Critical alarms (thanks for the comment), and then added a basic perfdata (only the size in MB no critical and warning value) Dim strfolder Dim intwarning Dim intcritic Dim wsh Dim intvelkost Dim intjednotka Dim Perf_Data '##########################################################' Set objFSO = CreateObject("Scripting.FileSystemObject") Set wsh = CreateObject("WScript.Shell") '##########################################################' If Wscript.Arguments.Count = 3 Then strfolder = Wscript.Arguments(0) intwarning = Wscript.Arguments(1) intcritic = Wscript.Arguments(2) Set objFolder = objFSO.GetFolder(strfolder) intjednotka = 1048576 '1MB->bytes' intvelkost = objFolder.Size/intjednotka Perf_Data = "|'FolderSize'=" & round (objFolder.Size / 1048576,1) & "MB;" if (objFolder.Size/1024000) > Cint(intcritic) then Wscript.Echo "CRITICAL:" & round (objFolder.Size / 1048576,1) & " MB" & Perf_Data Wscript.Quit(2) elseif (objFolder.Size/1048576) > Cint(intwarning) then Wscript.Echo "WARNING:" & round (objFolder.Size / 1048576,1) & " MB" & Perf_Data Wscript.Quit(1) else Wscript.Echo "OK:" & round (objFolder.Size /1048576,1) & " MB" & Perf_Data Wscript.Quit(0) end if else Wscript.Echo "UNKNOWN:"& strfolder &"-" & intwarning & "-" & intcritic Wscript.Quit(3) End If

Reviewed 9 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks