Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • 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

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4401Themes and Skins13Add-ons756Graphics 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
RAID Controllers 3Ware RAID / BBU / Enclosure Plugin for 32/64-bit Linux + Windows
0.0 (0)
315
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Sam N (3)
See More
Newest Contributors
signalgrid (1)Sanna Glue (2)fisherrs (1)smolinux (1)juanfertor (1)
See More

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

Privacy PolicyTerms of UseTrademarks
Home > Mathieu St-Amour
MS

Mathieu St-Amour

@nagmon7

User Stats

Member Since: June 23, 2023

Favorites0

Views

Projects0

No Projects Found
Active Directory (AD) Check

FsmoCheck bugfix found

When running the VB script, dcdiag /test:fsmocheck on long domain name, the vbscript get the result "passed test FsmoCheck" on multiple lines, and the script is getting a false error. For example: Running enterprise tests on : verylong.sub.topdomaine.com ------------------------------------ Starting test: FsmoCheck ......................... verylong.sub.topdomaine.com passed test FsmoCheck ------------------------------------ The FsmoCheck appears on the line after "passed test". The fix when a line end with "passed test", then add the next line at the end if this line. The code fix is available at: https://github.com/mst-amour/nagios/blob/main/check_ad.vbs Here is the updated function to update: -------------------------------- 'call dcdiag and parse the output sub exec(strCmd) 'Declare variables dim objShell : Set objShell = WScript.CreateObject("WScript.Shell") dim objExecObject, lineout, tmpline, tmpline_no_cr_lf, end_passed_str, tmpline_next lineout = "" 'Command line options we're using ' pt strCmd Set objExecObject = objShell.Exec(strCmd) 'Loop until end of output from dcdiag do While not objExecObject.StdOut.AtEndOfStream tmpline = lcase(objExecObject.StdOut.ReadLine()) tmpline_no_cr_lf = Replace(tmpline,chr(10),"") ' Newline tmpline_no_cr_lf = Replace(tmpline,chr(13),"") ' CR call parselang(tmpline_no_cr_lf) lineout = lineout + tmpline if (instr(tmpline_no_cr_lf, ".....")) then 'testresults start with a couple of dots, so lets reset the lineout buffer lineout= tmpline if (len(tmpline_no_cr_lf) > 13) then end_passed_str = Mid(tmpline_no_cr_lf, Len(tmpline_no_cr_lf) - 10, 11) if(StrComp(end_passed_str, "passed test") = 0) then tmpline_next = lcase(objExecObject.StdOut.ReadLine()) tmpline_next = Replace(tmpline_next,chr(10),"") ' Newline tmpline_next = Replace(tmpline_next,chr(13),"") ' CR tmpline_no_cr_lf = tmpline_no_cr_lf + tmpline_next end if end if end if if instr(tmpline_no_cr_lf, lcase(strOK)) then 'we have a strOK String which means we have reached the end of a result output (maybe on newline) call parse(tmpline_no_cr_lf) lineout = "" end if loop ' Catch the very last test (may be in the lineout buffer but not yet processed) if instr(lineout, lcase(strOK) & " test") OR instr(lineout, lcase(strNotOK) & " test") then 'we have a strOK String which means we have reached the end of a result output (maybe on newline) call parse(lineout) end if end sub

Reviewed 3 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile