Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do until textStream.AtEndOfStream
- input = textStream.ReadLine
- collection = split(input, ",")
- host = collection(0)
- domain = collection(1)
- result = monWinAv(host) 'result = UP or DOWN, maybe implement some error handling
- sql = "insert into MON_AV_NT(FQDN,IP,State)" & _
- " values('" & domain & "','" & host & "','" & result & "')"
- set resultSet = connect.Execute(sql)
- if result = "UP" then
- result = Split(monWinPerf(host), " ") 'example monWinPerf output: "27% 66%"
- sql = "insert into MON_PERF_NT(FQDN,IP,CPU_Usage,Memory_Usage)" & _
- " values('" & domain & "','" & host & "','" & result(0) & "','" & result(1) & "')"
- set resultSet = connect.Execute(sql)
- end if
- loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement