Sponsored Content
Special Forums UNIX and Linux Applications Infrastructure Monitoring Searching for Saas Monitor service which monitor my servers which are sitting in different providers Post 303002116 by MadeInGermany on Thursday 17th of August 2017 05:04:49 PM
Old 08-17-2017
You can have a look at my Nagios plugins, also in this forum.
They are shell scripts; you can adapt their output for your needs.

The current output for Nagios consists of a text message and an exit status 0(OK), 1(WARNING), 2(CRITICAL), 3(UNKNOWN).
After the text message there can be a pipe symbol followed by a performance data sample.

Nagios runs the plugin scripts periodically, with arguments that are typically thresholds for WARNING and CRITICAL.
Nagios displays the output text and reacts on the output status (i.e. raises WARNING or CRITICAL alerts)..
And it records the performance data (in rrd tool). The Web GUI draws perfdata out of it.

For basic monitoring I recommend: check_load5.sh check_disks.sh check_vmem.sh
 

9 More Discussions You Might Find Interesting

1. HP-UX

Monitor Service Status

Hey guys how do you determined the status of a certain service if its running or not aside from using ps. (0 Replies)
Discussion started by: sbn
0 Replies

2. Shell Programming and Scripting

Script to monitor sun servers temperature

Dears, need help on developing a script to monitor sun server temperature , I'm using the below command to check the servers one by one /usr/platform/`uname -i`/sbin/prtdiag -v Servers Models are : 2 x Sun SPARC Enterprise M9000 Server 4 x Sun Fire V490 2 x Sun Blade T6300 Server... (1 Reply)
Discussion started by: bejo4ever
1 Replies

3. Shell Programming and Scripting

Memory Usage Monitor on Linux/SunOS Servers

ok, so i'm trying to write a shell script (not perl) that monitors memory usage on a server. but i'm confused as to what fields exactly determines that yes, memory is low on a particular server. it sounds simple enough, but it really isn't. what do I look for in the field below? ... (1 Reply)
Discussion started by: SkySmart
1 Replies

4. AIX

Monitor Physical CPU usage on multiple servers

Hello, Looking for some help. I am trying to gather data at each server showing when the physical CPU is being used the most based on a weekly timeframe. I know this data can be seen through NMON but with multiple servers in our environment it could take a real long time. is there a easier... (4 Replies)
Discussion started by: audis$
4 Replies

5. Shell Programming and Scripting

Basic script for monitor send mail service

Hi All Need help Can any one share a basic script that is used for monitor sendmail service whether online, offline.etc in solaris Thanks in advance Zimmy (5 Replies)
Discussion started by: zimmyyash
5 Replies

6. Shell Programming and Scripting

script to monitor different processes on different Unix servers

GM, Can you pls help how to write a script to monitor different processes on different unix servers and send the output to a /tmp/report file, earlier my boss asked me to write a script to monitor just one process running on different servers and send the output to a file so I wrote this exec... (0 Replies)
Discussion started by: baders
0 Replies

7. UNIX for Dummies Questions & Answers

Script to monitor BI service and trigger a mail

Hello friends, I am new to shell scripting.I am assigned a task in Unix to prepare a script which will check if OBI 10g services are running or not and to send email if the services are down.Any help will be appreciated. I tried searching for it in the blog and came across the following code ... (1 Reply)
Discussion started by: pradeep467
1 Replies

8. Linux

Packages that monitor OS configs and service/ports?

I have several Redhat servers and workstations that I need to be able to monitor for any changes and be notified of any changes to the OS. The features I need to specifically monitor are: ports - opening of new ports that are not already in a whitelist services - any starting or attempts to start... (1 Reply)
Discussion started by: JCDinPGH
1 Replies

9. HP-UX

Critical Sevices and Process to be monitor on UNIX servers

Need to note the list of critical / important services and process need to monitor on unix server always with one line explanation for severity. Thanks in advance. (5 Replies)
Discussion started by: marunmeera
5 Replies
Nagios::Plugin::Performance(3pm)			User Contributed Perl Documentation			  Nagios::Plugin::Performance(3pm)

NAME
Nagios::Plugin::Performance - class for handling Nagios::Plugin performance data. SYNOPSIS
use Nagios::Plugin::Performance use_die => 1; # Constructor (also accepts a 'threshold' obj instead of warning/critical) $p = Nagios::Plugin::Performance->new( label => 'size', value => $value, uom => "kB", warning => $warning, critical => $critical, min => $min, max => $max, ); # Parser @perf = Nagios::Plugin::Performance->parse_perfstring( "/=382MB;15264;15269;; /var=218MB;9443;9448" ) or warn("Failed to parse perfstring"); # Accessors for $p (@perf) { printf "label: %s ", $p->label; printf "value: %s ", $p->value; printf "uom: %s ", $p->uom; printf "warning: %s ", $p->warning; printf "critical: %s ", $p->critical; printf "min: %s ", $p->min; printf "max: %s ", $p->max; # Special accessor returning a threshold obj containing warning/critical $threshold = $p->threshold; } # Perfdata output format i.e. label=value[uom];[warn];[crit];[min];[max] print $p->perfoutput; DESCRIPTION
Nagios::Plugin class for handling performance data. This is a public interface because it could be used by performance graphing routines, such as nagiostat (http://nagiostat.sourceforge.net), perfparse (http://perfparse.sourceforge.net), nagiosgraph (http://nagiosgraph.sourceforge.net) or NagiosGrapher (http://www.nagiosexchange.org/NagiosGrapher.84.0.html). Nagios::Plugin::Performance offers both a parsing interface (via parse_perfstring), for turning nagios performance output strings into their components, and a composition interface (via new), for turning components into perfdata strings. USE'ING THE MODULE If you are using this module for the purposes of parsing perf data, you will probably want to set use_die => 1 at use time. This forces &Nagios::Plugin::Functions::nagios_exit to call die() - rather than exit() - when an error occurs. This is then trappable by an eval. If you don't set use_die, then an error in these modules will cause your script to exit CLASS METHODS
Nagios::Plugin::Performance->new(%attributes) Instantiates a new Nagios::Plugin::Performance object with the given attributes. Nagios::Plugin::Performance->parse_perfstring($string) Returns an array of Nagios::Plugin::Performance objects based on the string entered. If there is an error parsing the string - which may consists of several sets of data - will return an array with all the successfully parsed sets. If values are input with commas instead of periods, due to different locale settings, then it will still be parsed, but the commas will be converted to periods. OBJECT METHODS (ACCESSORS) label, value, uom, warning, critical, min, max These all return scalars. min and max are not well supported yet. threshold Returns a Nagios::Plugin::Threshold object holding the warning and critical ranges for this performance data (if any). rrdlabel Returns a string based on 'label' that is suitable for use as dataset name of an RRD i.e. munges label to be 1-19 characters long with only characters [a-zA-Z0-9_]. This calls $self->clean_label and then truncates to 19 characters. There is no guarantee that multiple N:P:Performance objects will have unique rrdlabels. clean_label Returns a "clean" label for use as a dataset name in RRD, ie, it converts characters that are not [a-zA-Z0-9_] to _. It also converts "/" to "root" and "/{name}" to "{name}". perfoutput Outputs the data in Nagios::Plugin perfdata format i.e. label=value[uom];[warn];[crit];[min];[max]. SEE ALSO
Nagios::Plugin, Nagios::Plugin::Threshold, http://nagiosplug.sourceforge.net. AUTHOR
This code is maintained by the Nagios Plugin Development Team: see http://nagiosplug.sourceforge.net. COPYRIGHT AND LICENSE
Copyright (C) 2006-2007 Nagios Plugin Development Team This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-12-03 Nagios::Plugin::Performance(3pm)
All times are GMT -4. The time now is 03:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy