Check out thwack Ambassador, Derek Schauland's newest post on Storage Arrays.
Also, don't forget to update your email address in your profile!

Search 140,365 posts and 1,367 resources contributed by 129,118 members or post a topic.

Already Joined? Sign in
Monitoring Send from Solarwinds

Page 1 of 1 (11 items) | RSS

rated by 0 users
Answered (Verified) This post has 1 verified answer | 10 Replies | 2 Followers | 284 Views


116 Posts
Points 378
Script Guru
bobross replied on Thu, Jan 12 2012 11:35 AM
rated by 0 users

We've got a large number of Solarwinds servers at client sites.  From time to time email alerting is affected by network changes.  Unfortunately, the issue persists until someone happens to login to Solarwinds and sees alerts that we haven't received emails about.  We'd like to setup a monitor to verify that our Solarwinds server can send emails out to us.

The POP3/IMAP4 monitors won't work for us because it will require each client to configure their networks to allow inbound email traffic to our server.

I've been experimenting with telnet using a VBScript.  I've determined that there are two ways to really go about this effectively.

1) Install 3rd party application/dll and call this with VBScript.

2) Use VBScript to call telnet in a terminal with output to a log file.  Read from the file, then delete/clear the file.

Neither solution is really optimal, so I was wondering if anyone else has figured out how to handle this situation.

Once the monitor is set up we will add the monitors to the EOC page so that we can see when there are issues with email delivery.

  • | Post Points: 3

Answered (Verified) Verified Answer


116 Posts
Points 378
Script Guru
Answered (Verified) bobross replied on Sat, Jan 28 2012 11:38 AM
rated by 0 users
Verified by bobross

Just wanted to follow up on this.

Testing the Port 25 monitor from our local box to the box at the client site failed.

What we ended up doing was running a VBScript that calls plink (plink is a command line version of putty).  Since putty is used by pretty much everyone in the office, management gave the thumbs up.

Its a pretty basic script that just checks for a 220 response from the SMTP server.  I wasn't able to get a 'helo' command to properly respond from inside Solarwinds, but a 220 response should give adequate monitoring of SMTP traffic.

Here is the script I've got running as a test over the next few days:

strCommand = "C:\plink.exe -telnet -P 25 smtp.server.com"
Set wshObj = WScript.CreateObject("WScript.Shell")
Set exec = wshObj.Exec(strCommand)

strText = exec.StdOut.Readline()
exec.Terminate

set re = new regexp
re.Pattern = "220"

if Not re.Test(strText) Then
  WScript.Echo "Message: SMTP Failed"
  WScript.Echo "Statistic: 1"
  WScript.Quit(1)
End If

WScript.Echo "Message: " & strText
WScript.Echo "Statistic: 0"
WScript.Quit(0)

  • | Post Points: 21

All Replies


2,084 Posts
Points 31,066
Moderator
SolarWinds Employee
aLTeReGo replied on Fri, Jan 13 2012 12:17 PM
rated by 0 users

There's a couple different ways of going about this but first the VBScript you mentioned, what would that connect to via telnet and where would it be run from? Would this be a telnet/VBscript run from your central office run against your clients Orion servers, or would this be a telnet/VBscript run on the customers APM server pointed at what server over what port?

The way I'd probably handle this is to setup a POP3 or IMAP4 User Experience monitor against Gmail. If they can send mail to Gmail then most likely they can send mail to you. 

Another option would be to install the IIS SMTP server on the Orion server and point the Advanced Alert Manager to use the localhost SMTP server for email delivery. Then configure the reply-to address on email alerts to go to someone in the local office so should a bounce back message be sent, such as email delivery failed the bounce back message would go to someone in the local office who could then notify you through some other means. The idea being that the server may not be able to deliver mail to you, but it should be able to deliver email to the exchange server sitting in the next rack over.

The last trick up my sleeve would be to leverage PageGate and a traditional or cellular modem to send alerts if they're not acknowledged after some predetermined time interval. 

  • | Post Points: 3

116 Posts
Points 378
Script Guru
bobross replied on Fri, Jan 13 2012 12:36 PM
rated by 0 users

The VBScript that I'm looking at would be run locally on the Solarwinds server at a client site.  It would open a telnet connection over port 25 to our externally facing email server and possibly execute a HELO command.  I've tested manually on a server that we can receive email from as well as from a server that we can't receive an email from and I am seeing the expected behavior.  The tricky part is getting it scripted into VBScript.  The third party DLL/App option is a no go due to confidentiality issues (management decision).

Google searches for telnet using vbscript indicate that this is a problem with no real solution, but I was hoping someone here might be able to assist.  If nothing else I'll work up a script and post it up for anyone with some more VBScript experience to help tweak a bit.

The best solution I've been able to come up with so far is to have VBScript call Telnet and log the output to a file, then read the file and parse for success/failure.  I think it will be workable, but its so inelegant that I wouldn't want to put my name on it.

 

Regarding POP3/IMAP4 User Experience Monitors, the problem we have with this is uncooperative site staff that would need to open up the inbound ports.  Getting them all to comply would be way more work than setting up a VBScript to do this.

Emails to local site staff was considered, but was shot down by management for "business reasons".  That would have been a good solution though.

The final option of using PageGate won't work for our shop either for a number of reasons.

 

 

  • | Post Points: 3

2,084 Posts
Points 31,066
Moderator
SolarWinds Employee
aLTeReGo replied on Sat, Jan 14 2012 3:53 PM
rated by 0 users

So instead of using the VBScript why not use the TCP Port monitor and define the port as 25. This would be virtually identical to your VBScript short of the HELO, but it's reasonable to assume that if the port is open/listening then you can send mail.

  • | Post Points: 3

116 Posts
Points 378
Script Guru
bobross replied on Sat, Jan 14 2012 5:16 PM
rated by 0 users

Can you explain how the TCP port monitor works?  Does it send traffic somewhere and will it show as down if the problem doesn't lie on the Solarwinds' box itself, but somewhere else on the network?

The description of the TCP Port Monitor says " This component monitor tests the ability of a TCP/IP-based service to accept incoming sessions."  Which indicates that outgoing traffic might still not be working.

I'm not against the idea, but without an understanding of how the TCP port monitor works I'll have a hard time selling it as sufficient monitoring of Solarwinds alerting.

  • | Post Points: 1

116 Posts
Points 378
Script Guru
bobross replied on Sat, Jan 14 2012 5:27 PM
rated by 0 users

Unfortunately, I just tested the TCP Port Monitor on a box that is having trouble sending email and it passed, so this solution won't work for us.  This same server fails a telnet to our email server over port 25.

Thanks for the idea at any rate.

  • | Post Points: 3

2,084 Posts
Points 31,066
Moderator
SolarWinds Employee
aLTeReGo replied on Sun, Jan 15 2012 6:42 PM
rated by 0 users

This is very odd behavior. The TCP port monitor works identically to telneting to the specified port. While no data is sent as part of the TCP Port monitor unlike your script the monitor should show a "down" status if the remotely monitored port is not open/listening/reachable.

  • | Post Points: 5

131 Posts
Points 510
SolarWinds Certified Professional
nrms replied on Sun, Jan 15 2012 9:55 PM
rated by 0 users

Just to throw that old "gotcha" out there; you don't happen to have McAfee running somewhere? Don't forget its habit of blocking most programs from connecting out to  port 25 on remote systems!

SolarWinds Certified Professional #1750
SolarWinds Orion Core 2011.1.0, APM 4.0.1, IPAM 2.0, IPSLAMGR 3.5.1, NCM 6.1, NPM 10.1.2, NTA 3.7, IVIM 1.1.0

  • | Post Points: 1

116 Posts
Points 378
Script Guru
bobross replied on Sun, Jan 15 2012 9:55 PM
rated by 0 users

Double post

  • | Post Points: 1

116 Posts
Points 378
Script Guru
bobross replied on Sun, Jan 15 2012 10:04 PM
rated by 0 users

I think that the port monitor is functioning correctly, but I was testing it locally on the Solarwinds box at the client site.

ClientSolarwinds -> ClientNetwork -> Internet -> OurNetwork -> OurEmail/OurSolarwinds

Instead of what is expected to happen with the port monitor when it is set up on a machine that is not the Solarwinds box itself (e.g. Solarwinds sends traffic to other machine and verifies connection) it was just going over the loopback interface and never actually touching the client's network.

I'm going on vacation, but when I get back I will try to test the port monitor from our local corporate Solarwinds box to the Solarwinds boxes at the client site.  I think that this might actually work.

 

Regarding McAfee - This is related to network configuration issues.  Hopefully any monitor that we get set up will trigger regardless of the source of traffic blockage.  I appreciate the help, but in this case we know that the client has a misconfigured firewall (they've told us that it is misconfigured and never bothered to fix it). 

The goal of the monitor we are trying to create would be to provide a visual indication (either through a delivered alert or on our EOC page) that there are problems with emails being sent from one of the Solarwinds boxes at a client site.  Currently, the only time we find out that there is a problem is when someone happens to log into the client's Solarwinds and notices alerts that weren't reported to us.  Since the main reason for logging in to Solarwinds is to validate alerts, it could sometimes be up to a month before anyone notices this... And its even worse when we receive an email from a client asking why they weren't contacted about a mission critical device going down.

 

Thanks again for working through this with me alterego.

  • | Post Points: 1

116 Posts
Points 378
Script Guru
Answered (Verified) bobross replied on Sat, Jan 28 2012 11:38 AM
rated by 0 users
Verified by bobross

Just wanted to follow up on this.

Testing the Port 25 monitor from our local box to the box at the client site failed.

What we ended up doing was running a VBScript that calls plink (plink is a command line version of putty).  Since putty is used by pretty much everyone in the office, management gave the thumbs up.

Its a pretty basic script that just checks for a 220 response from the SMTP server.  I wasn't able to get a 'helo' command to properly respond from inside Solarwinds, but a 220 response should give adequate monitoring of SMTP traffic.

Here is the script I've got running as a test over the next few days:

strCommand = "C:\plink.exe -telnet -P 25 smtp.server.com"
Set wshObj = WScript.CreateObject("WScript.Shell")
Set exec = wshObj.Exec(strCommand)

strText = exec.StdOut.Readline()
exec.Terminate

set re = new regexp
re.Pattern = "220"

if Not re.Test(strText) Then
  WScript.Echo "Message: SMTP Failed"
  WScript.Echo "Statistic: 1"
  WScript.Quit(1)
End If

WScript.Echo "Message: " & strText
WScript.Echo "Statistic: 0"
WScript.Quit(0)

  • | Post Points: 21
Page 1 of 1 (11 items) | RSS

© 2003 - 2012 SolarWinds, Inc. All Rights Reserved.

Who is SolarWinds?

SolarWinds is rewriting the rules for how companies manage their networks. Guided by a global community of network engineers, SolarWinds develops simple and powerful network management software and network monitoring software for networks of all sizes. SolarWinds also offers a network certification program to become a SolarWinds Certified Professional (SCP).

What is thwack?

thwack, SolarWinds online community site, was designed by network engineers, for network engineers. thwack is a vibrant, growing community of more than 30,000 IT pros who share a passion for technology.

Explore Resources, Answers, Templates, and Advice

Download Free Networking Tools


Learn More About SolarWinds Products