Hi,
Have any of you ever managed to install the plugin in question?
https://labs.consol.de/nagios/check_sap ... index.html
It sounds crazy, I can't find the right solution to get it started.
could not load perl module SAPNW
Regards,
-Fede
check_sap_health.. and then go crazy
Re: check_sap_health.. and then go crazy
Hi,
I looked inside "check_sap_health" and the error came from
Looks like you need to install "sapnwrfc" perl module.
My "sapnwrfc" install failed, so I have to force it:
Setting this up was not easy. I have spent quite a bit of times on this which I should not since we do not support scripts from Nagios Exchange.
I do not have an SAP account to be able to download NW SDK, so i picked up the old "nwrfcsdk.zip" on the web so that I can copy those SDK libraries based on the instruction.
Since I don't' have SAP, I'm not able to test the script, but I was able to bring up the help:
[root@vt-nagiosxi-61 libexec]# ./check_sap_health --help
Regards,
Vinh
I looked inside "check_sap_health" and the error came from
Code: Select all
if (eval "require sapnwrfc") {
} else {
$self->add_message(CRITICAL,
'could not load perl module SAPNW');
}
Code: Select all
$ perl -MCPAN -e "install sapnwrfc"
Code: Select all
cpan -f -i sapnwrfc
I do not have an SAP account to be able to download NW SDK, so i picked up the old "nwrfcsdk.zip" on the web so that I can copy those SDK libraries based on the instruction.
Since I don't' have SAP, I'm not able to test the script, but I was able to bring up the help:
[root@vt-nagiosxi-61 libexec]# ./check_sap_health --help
Code: Select all
check_sap_health $Revision: 2.1.0.2 $ [http://labs.consol.de/nagios/check_sap_health]
This monitoring plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU
General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
This plugin checks sap netweaver
Usage: check_sap_health [ -v|--verbose ] [ -t <timeout> ] --mode <what-to-do> --ashost <hostname> --sysnr <system number> ...]
-?, --usage
Print usage information
-h, --help
Print detailed help screen
-V, --version
Print version information
-t, --timeout=INTEGER
Seconds before plugin times out (default: 15)
-v, --verbose
Show details for command-line debugging (can repeat up to 3 times)
--ashost
Hostname or IP-address of the application server
--sysnr
The system number
--mshost
Hostname or IP-address of the message server
--msserv
The port for mshost connections
--r3name
The SID for mshost connections
--group
The logon group for mshost connections
--gwhost
The gateway host
--gwserv
The gateway port
--username
The username
--password
The password
--client
The client
--lang
The language
--separator
A separator for MTE path elements
--mtelong
Output the full path of MTEs
--unique
The parameter limits the output to unique (or only the last) items.
--mode
A keyword which tells the plugin what to do
uptime (Check the uptime of the device)
connection-time (Time to connect to the server)
sapinfo (Time to connect and show system atttributes like sapinfo)
list-ccms-monitor-sets (List all available monitor sets)
list-ccms-monitors (List all monitors (can be restricted to a monitor set with --name))
list-ccms-mtes (List all MTEs (must be restricted to a monitor set / monitor with --name/--name2))
ccms-mte-check (Check all MTEs (must be restricted to a monitor set / monitor with --name/--name2))
shortdumps-list (Read the SNAP table and list the short dumps)
shortdumps-count (Read the SNAP table and count the short dumps (can be restricted with --name/--name2 = username/program))
shortdumps-recurrence (Like shortdumps-count, but counts the recurrence of the same errors)
failed-updates (Counts new entries in the VHDR table (since last run or appeared in the interval specified by --lookback))
failed-jobs (Looks for failed jobs in the TBTCO table (since last run or in the interval specified by --lookback))
exceeded-failed-jobs (Looks for jobs in the TBTCO table which failed or exceeded a certain runtime (since last run or in the interval specified by --lookback))
count-processes (count the types of work processes)
workload-overview (Checks response time of task types (like ST03))
failed-idocs (Looks for failed IDoc-status-records in the EDIDS table)
list-processes (List the running work processes)
list-jobs (Read the TBTCO table and list the jobs)
list-idocs (Lists IDoc-status-records in the EDIDS table)
--regexp
Parameter name/name2/name3 will be interpreted as (perl) regular expression
--warning
The warning threshold
--critical
The critical threshold
--warningx
The extended warning thresholds
e.g. --warningx db_msdb_free_pct=6: to override the threshold for a
specific item
--criticalx
The extended critical thresholds
--units
One of %, B, KB, MB, GB, Bit, KBi, MBi, GBi. (used for e.g. mode interface-usage)
--name
The name of a specific component to check
--name2
The secondary name of a component
--name3
The tertiary name of a component
--extra-opts
read command line arguments from an external file
--blacklist
Blacklist some (missing/failed) components
--mitigation
The parameter allows you to change a critical error to a warning.
It works only for specific checks. Which ones? Try it out or look in the code.
--mitigation warning ranks an error as warning which by default would be critical.
--lookback
The amount of time you want to look back when calculating average rates.
Use it for mode interface-errors or interface-usage. Without --lookback
the time between two runs of check_nwc_health is the base for calculations.
If you want your checkresult to be based for example on the past hour,
use --lookback 3600.
--environment
Add a variable to the plugin's environment
--negate
Emulate the negate plugin. --negate warning=critical --negate unknown=critical
--morphmessage
Modify the final output message
--morphperfdata
The parameter allows you to change performance data labels.
It's a perl regexp and a substitution.
Example: --morphperfdata '(.*)ISATAP(.*)'='$1patasi$2'
--selectedperfdata
The parameter allows you to limit the list of performance data. It's a perl regexp.
Only matching perfdata show up in the output
--report
Can be used to shorten the output
--multiline
Multiline output
--with-mymodules-dyn-dir
Add-on modules for the my-modes will be searched in this directory
--statefilesdir
An alternate directory where the plugin can save files
--isvalidtime
Signals the plugin to return OK if now is not a valid check time
Regards,
Vinh