SHARE
TWEET

Untitled

a guest Aug 21st, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. do until textStream.AtEndOfStream
  2.     input = textStream.ReadLine
  3.     collection = split(input, ",")
  4.  
  5.     host = collection(0)
  6.     domain = collection(1)
  7.  
  8.     result = monWinAv(host) 'result = UP or DOWN, maybe implement some error handling
  9.         sql = "insert into MON_AV_NT(FQDN,IP,State)" & _
  10.             " values('" & domain & "','" & host & "','" & result & "')"
  11.     set resultSet = connect.Execute(sql)
  12.  
  13.     if result = "UP" then
  14.         result = Split(monWinPerf(host), " ") 'example monWinPerf output: "27% 66%"
  15.         sql = "insert into MON_PERF_NT(FQDN,IP,CPU_Usage,Memory_Usage)" & _
  16.             " values('" & domain & "','" & host & "','" & result(0) & "','" & result(1) & "')"
  17.         set resultSet = connect.Execute(sql)
  18.     end if
  19. loop
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top