Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Writing tcpip service to monitor VMS node

 
Brent Weaver_1
Occasional Advisor

Writing tcpip service to monitor VMS node

Hello. I am looking to write a command file that will serve as a "program" to allow me to interact with VMS through a TCP port. I know that you need to use SYS$NET and define SYS$OUTPUT and SYS$INPUT to be SYS$NET but I cannot get it to work correctly. I have been testing just simple interaction by telneting localhost to the port.

My ultimate goal is to write something that i can attach to with perl from a Linux system for proactive monitoring. The Linux side will be running Nagios. I have tried and tried to get the NRPE agent running on VMS and cannot.

I would like to be able to initiate a socket connection from Linux and pass in a COM file that will be run from a specific directory and then write back to the tcpip device/sys$net.

Any help is GREATLY appreciated. I have posted before and gotten complex answers. I am aiming for simplicity and I know that it can easily be achieved in VMS!

Thanks in advance!
2 REPLIES 2
Hoff
Honored Contributor

Re: Writing tcpip service to monitor VMS node

There are several existing threads that appear to be previous parts of your quest here, including involving NRPE errors, AgentX and SNMP, and there's an example of using telnet to chat with DCL in one of the threads here:

http://h30499.www3.hp.com/t5/Networking/Creating-a-port-listening-service/m-p/4689464#M9422

 

As for using telnet as a transport, programs aren't users, and programs have a difficult time with user-focused data and with having to scrape data and layouts intended for users. VMS is particularly nasty here, as many of the common tools format the screens using (as you've discovered) ANSI control sequences. Screen-scraping may be a last resort, but it's seldom a first resort. It gets ugly.

Beyond the DCL example from that earlier thread (and this if you're going to create your own tools), have a look at the TCPIP$EXAMPLES: example programs, and have a look at most any hunk of perl that chats on a network. The examples can allow you to monitor whatever you like.

Here's a high-level overview of using Perl with networking:

http://www.techrepublic.com/article/solutionbase-set-up-customized-network-monitoring-with-perl/5149529

I'd probably sort out whatever was wrong with NRPE or the other attempts, as writing new code for an old problem tends to make for a larger problem.

There are a few existing monitoring tools around, and here is a brief list of some of the packages:

http://www.slac.stanford.edu/xorg/nmtf/nmtf-tools.html

Here's an introduction to accessing an OpenVMS SNMP MIB from a Mac OS X box:

http://labs.hoffmanlabs.com/node/1117

There's a good intro to SNMP linked from there. (Now there appear to be issues with network performance and connectivity in your environment, and that can derail SNMP?)

The HP tools tend to be based on SMH or derivatives.

While I don't have any remote-monitoring tools for VMS posted (I do have some syslog stuff, but that will require some hackery), I'd be surprised if there aren't some tools posted around the 'net.

http://vouters.dyndns.org/tima/All-OS-snmp-director-tool.html

There are (were?) various commercial products, as well:

http://www.ca.com/files/productbriefs/nsm-system-monitoring-openvms-pb_197554.pdf

Personally? I'd probably first look to sort out the Nagios NRPE problem.

> Any help is GREATLY appreciated. I have posted before and gotten complex answers. I am aiming for simplicity and I know that it can easily be achieved in VMS!

Unfortunately, VMS just isn't as simple nor as easy as other platforms. What are stock features and capabilities on other platforms will often require the system manager and often a programmer to create custom code and product installations and reconfigurations with VMS. Put another way, this is why you're getting complex answers. There aren't simple (free) ones.

Martin Vorlaender
Honored Contributor

Re: Writing tcpip service to monitor VMS node

The main problem with the NRPE agent code is that it uses fork to handle network connections (like most any *ix based program does). I've rewritten it to use POSIX threads instead, and have it running on VMS (Alpha 7.3-2). If I had gotten around to polish it for distribution, I'd have published it. If you want to give it a try, drop me an email at mv -at- pdv-systeme.de.

cu,
Martin