--- /dev/null
+# ---------------------------------------------------------------------------
+# OS Specific variables. A few external programs are used by spong-client,
+# spong-network, and spong-message. Chances are these differ from OS to OS.
+# A couple of things to watch for.
+#
+# $DF Your df command should output %used as the first column with a '%'
+# $PS You really want you ps command to return sorted via CPU usage
+# $PING Make sure your ping command only pings a finite number of times
+# ---------------------------------------------------------------------------
+
+$DF = "/usr/bin/df";
+$UPTIME = "/usr/bin/uptime";
+$PS = "/usr/bin/ps -eF \"pcpu time vsz pid ruser args\" | /usr/bin/sort -r";
+$GREP = "/usr/bin/grep";
+$PING = "/usr/sbin/ping -n -c 2 HOST";
+$TRACEROUTE = "/usr/bin/traceroute";
+$SENDMAIL = "/usr/sbin/sendmail -t";
+$MAILQ = "/usr/sbin/sendmail -bp";
+$RPCINFO = "/bin/rcpinfo -u";
+
+1; # I'm a file that gets included in perl code - leave this 1 here...
--- /dev/null
+# ---------------------------------------------------------------------------
+# OS Specific variables. A few external programs are used by spong-client,
+# spong-network, and spong-message. Chances are these differ from OS to OS.
+# A couple of things to watch for.
+#
+# $DF Your df command should output %used as the first column with a '%'
+# $PS You really want you ps command to return sorted via CPU usage
+# $PING Make sure your ping command only pings a finite number of times
+# and since some ping command want args after the host, put the
+# word HOST where you need the host to be in your ping command
+# ---------------------------------------------------------------------------
+
+$DF = "/bin/df";
+$UPTIME = "/usr/bin/uptime";
+$PS = "/bin/ps -ax";
+$GREP = "/usr/bin/grep";
+$PING = "/sbin/ping -c 2 HOST";
+$TRACEROUTE = "/usr/sbin/traceroute";
+$SENDMAIL = "/usr/sbin/sendmail -t";
+$MAILQ = "/usr/sbin/sendmail -bp";
+
+1; # I'm a file that gets included in perl code - leave this 1 here...
--- /dev/null
+# ---------------------------------------------------------------------------
+# OS Specific variables. A few external programs are used by spong-client,
+# spong-network, and spong-message. Chances are these differ from OS to OS.
+# A couple of things to watch for.
+#
+# $DF Your df command should output %used as the first column with a '%'
+# $PS You really want you ps command to return sorted via CPU usage
+# $PING Make sure your ping command only pings a finite number of times
+# and since some ping command want args after the host, put the
+# word HOST where you need the host to be in your ping command
+# ---------------------------------------------------------------------------
+
+$DF = "/usr/bin/bdf";
+$UPTIME = "/usr/bin/uptime";
+$PS = "/bin/ps -ef";
+$GREP = "/bin/grep";
+$PING = "/etc/ping HOST -n 2";
+$TRACEROUTE = "/usr/contrib/bin/traceroute";
+$SENDMAIL = "/usr/lib/sendmail -t";
+$MAILQ = "/usr/lib/sendmail -bp";
+
+1; # I'm a file that gets included in perl code - leave this 1 here...
--- /dev/null
+# ---------------------------------------------------------------------------
+# OS Specific variables. A few external programs are used by spong-client,
+# spong-network, and spong-message. Chances are these differ from OS to OS.
+# A couple of things to watch for.
+#
+# $DF Your df command should output %used as the first column with a '%'
+# $PS You really want you ps command to return sorted via CPU usage
+# $PING Make sure your ping command only pings a finite number of times
+# and since some ping command want args after the host, put the
+# word HOST where you need the host to be in your ping command
+# ---------------------------------------------------------------------------
+
+$DF = "/bin/df -P";
+$UPTIME = "/usr/bsd/uptime";
+$PS = "/bin/ps -ef";
+$GREP = "/sbin/grep";
+$PING = "/usr/etc/ping -c 2 HOST";
+$TRACEROUTE = "/usr/etc/traceroute";
+$SENDMAIL = "/usr/lib/sendmail -t";
+$MAILQ = "/usr/lib/sendmail -bp";
+
+1; # I'm a file that gets included in perl code - leave this 1 here...
--- /dev/null
+# ---------------------------------------------------------------------------
+# OS Specific variables. A few external programs are used by spong-client,
+# spong-network, and spong-message. Chances are these differ from OS to OS.
+# A couple of things to watch for.
+#
+# $DF Your df command should output %used as the first column with a '%'
+# $PS You really want you ps command to return sorted via CPU usage
+# $PING Make sure your ping command only pings a finite number of times
+# ---------------------------------------------------------------------------
+
+$DF = "/usr/bin/df";
+$UPTIME = "/usr/ucb/uptime"; # Use berkely uptime,
+ # OSF1 load avg is 5, 30, 60 seconds
+$PS = "/usr/bin/ps -ef -o \"pcpu time vsz pid ruser args\" | /usr/bin/sort -r";
+$GREP = "/usr/bin/grep";
+$PING = "/sbin/ping -n -c 2 HOST";
+$TRACEROUTE = "/usr/sbin/traceroute";
+$SENDMAIL = "/usr/lib/sendmail -t";
+$MAILQ = "/usr/lib/sendmail -bp";
+$RPCINFO = "/usr/sbin/rcpinfo -u";
+
+undef $LSPS;
+
+sub get_swap {
+ my( $msg, $page, $skip);
+
+ $skip = 1; $msg = ""; $page = 0;
+ open (FOO,"-|") or exec "/sbin/swapon -s";
+ while (<FOO>) {
+ if (/^Total swap alloc/) { $skip = 0; }
+ if ($skip) {next;}
+ $msg .= $_;
+ if (/Available space:\s+\d+\s+pages \(\s*(\d+)%\)/) {
+ $page = 100 - $1;
+ }
+ }
+ close FOO;
+
+ return ($msg,$page);
+
+}
+
+1;
--- /dev/null
+# Register routine with plugin registery
+$CHECKFUNCS{'mailq'} = \&check_mailq;
+
+# Sendmail mailq check for mail servers. If checks the numeber of mail
+# message queue against the $MAILQWARN AND $MAILQCRIT variables
+
+sub check_mailq {
+ my($mqcnt, $message, $color, $summary );
+
+ open (FOO,"$MAILQ |");
+ $mqcnt = 0;
+ while (<FOO>) {
+ if (/Mail Queue\s+\((\d+)/) { $mqcnt = $1; }
+
+ # Grab the first 10 entries.
+ if (++$lines <= 35) { $message .= $_ };
+ }
+ close FOO;
+
+ $color = "green";
+ if ($mqcnt > $MAILQWARN) { $color = "yellow"; }
+ if ($mqcnt > $MAILQCRIT) { $color = "red"; }
+
+ $summary = "Mail Queue count = $mqcnt";
+
+ &debug("mailq - $color, $summary");
+ &status( $SPONGSERVER, $HOST, "mailq", $color, $summary, $message );
+}
+
+# I'm include perl code, I need this line.
+1;
+