Good day,
I've been attempting to monitor an Apache HTTP server version 2.2.15 running on a CentOS 6.5 (running on Oracle VM VirtualBox) in SAM 6.0 (running on Windows Server 2008 R2); before proceeding any further, would like to note that I'm still a newbie in using Orion and would appreciate some feedback from the community.
Prior to adding the Apache HTTP server to SAM, I've performed the following steps on the CentOS server:
1. Edited the snmpd.conf file to add the following entries:
rocommunity public <ip_address>
rwcommunity priviate <ip_address>
2. Successfully executed a snmpwalk (both v1 and v2c) locally.
# snmpwalk -v 1 -c public -O e <server_ip_address>
# snmpwalk -v 2c -c public -O e <server_ip_address>
3. Added the following rules in IPTables to allow HTTP and SNMP to be accessed externally.
# iptables -I input 2 -m state --state NEW -m tcp -p tcp --dport 161 -j ACCEPT
# iptables -I input 2 -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT
# iptables -I input 2 -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
4. Started the HTTPd daemon/service successfully.
# service httpd start
5. Accessed the Apache server and performed a SNMP walk (using snmpwalk utility for both v1 and v2c) from the Windows Server 2008 R2 server successfully.
6. To add Apache in SAM, clicked Settings -> SAM Settings -> Manually Assigned Application.
7. Selected Apache followed by selecting the node (or Apache server) from the list and then providing the proper credentials in accessing the Apache server.
8. Clicked Test button; after a while, all Component Test Results returned an "Linux script execution error."
Detailed description of the error message is as follows:
Testing node on <ip_address>: failed with 'Unknown' status.
Scripting Error: Script does not contain the expected parameters or is improperly formatted. 'Statistic' missing.
Output: ================================================================
Can't locate URI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/local/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5.) at (eval 6) line 3.
Compilation failed in require at /usr/local/share/perl5/HTTP/Request.pm line 3.
Compilation failed in require at /usr/local/share/perl5/LWP/UserAgent.pm line 10.
BEGIN failed--compilation aborted at /usr/local/share/perl5/LWP/UserAgent.pm line 10.
Compilation failed in require at /tmp/APM_355417347.pl line 7.
BEGIN failed--compilation aborted at /tmp/APM_35517347.pl line 7.
After seeing the part of the error message referring to the Perl modules specifically the LWP, I went back to the CentOS server and checked the installed modules on the server.
# instmodsh
Available commands are:
l - List all installed modules
m <module > - Select a module
q - Quit the program
cmd? l
Installed modules are:
Perl
Admittedly limited knowledge on Perl modules but based on the error message's detail, is it possible that the root cause of the error message is due to the LWP module not being installed? Based on the assumption that LWP is not built-in to Perl.
Thank for your time in reading this post and looking forward for some feedback.