LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Monitoring with perl script (https://www.linuxquestions.org/questions/linux-enterprise-47/monitoring-with-perl-script-174630/)

tidom 04-26-2004 04:22 AM

Monitoring with perl script
 
I have made any perl scripts to survey my servers from a linux.
Of course, there are some of those on Wondows.
So, is anybody knows a command to survey a windows service from a linux.

Thanks.

chort 04-26-2004 11:42 AM

Depends on what you want to do. If you just want to check simple things, like is a specific file available on the HTTP server, can you get a connection banner on the SMTP server, etc then those can be done fairly trivially. If you want to check the status of a proprietary Windows service that is not network-accessible, then you would need to run the script on that box itself (of course).

I would suggest browsing www.CPAN.org for modules that may help in polling Windows services
Also the following books may be helpful:
Learning Perl on Win32 Systems
Perl for System Administration

I have the latter book and it does have some useful examples of things you can do on Win32 systems using some of the Win32-specific PERL modules.

tidom 04-27-2004 04:18 AM

Thank you for your answer but, as you said, i have to check a proprietary windows service status.
I have already searched on CPAN but it only provides system administration scripts for "system" to "same system". My pb is to check a windows service status from a linux system.
I think i will use a link to an another apache web page based on a win32 system but if there is another way to resolve my pb without using another computer, i am really interresting.

440beeper 05-02-2004 05:10 AM

The Win32 modules should allow you to do this. I seem to recall that you can specify remote machines as a parameter to query the services. It's been a while since I've looked at it and I'm going by memory (always a scary thing), but I'm pretty sure it works that way. I do this at work but a slightly different way. I just use "MSINFO32 \\server /r server.txt" in my script (looping thru all the servers) and check the output of the text file. This way I can verify that all the automatic services are running, keep an eye on disk space, etc.

david_ross 05-02-2004 02:01 PM

You may be able to save yourself some work by using an established project such as nagios:
http://www.nagios.org


All times are GMT -5. The time now is 05:25 AM.