10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
data:
bblah1_blah2_blah3_blah4_blah5
bblahA_blahB_blahC_blahD_blahE
im using the following code to grab the field i want:
cat data | while IFS='_' read v1 v2 v3 v4 v5; do printf '%s\n' "${v4}"; done
im catting data here. in the real world, the exact content of data will be in a variable.... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Infrastructure Monitoring
We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side.
I was wondering if there is any way to setup cross dependencies... (1 Reply)
Discussion started by: eugenes18t
1 Replies
3. Infrastructure Monitoring
Hello Experts,
I have my windows servers located at different data-centers across US and I am monitoring all of them using Nagios server configured on a CentOS. All communications are done via public IP address and I doubt it can invite some security threats too. Can anyone let me know if it is... (3 Replies)
Discussion started by: naw_deepak
3 Replies
4. Shell Programming and Scripting
Hi,
my script is setting a variable with value and this variable is present in my another command that is coming from external file and this command is internally called after this variable is set. but while execution of this command, the value is not retrieved properly.
say,
my script... (5 Replies)
Discussion started by: rbalaj16
5 Replies
5. AIX
Hi all,
I'm new in this forum.
I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli".
The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory.
I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies
6. Web Development
Hi,
I am trying to implement a server monitoring dashboard using cgi scripting. I am planning to run the necessary unix scripts from the web page using cgi. This method works fine for standard unix commands but I am unable to run some external unix commands (like swadm show_processes, swadm... (9 Replies)
Discussion started by: jofinjoseph
9 Replies
7. Infrastructure Monitoring
Hi,
Installed it and all seems okay except when I try to actually use it. :-(
Visiting my nagios url, it says
Logs and conf's follow:
nagios.log is:
# cat /usr/local/nagios/var/nagios.log | tail -5
Successfully shutdown... (PID=3613)
Nagios 3.2.2 starting... (PID=4645)... (7 Replies)
Discussion started by: smcracraft
7 Replies
8. Red Hat
HI all,
This is my first topic in this forum.
I have a test environment which has a fedora in it and i installed nagios 3.0.6
I added windows clients into it.
But i am not getting informative outputs from it.
Can anyone tell me where i can edit inorder to get a more informative garph output.... (4 Replies)
Discussion started by: Renjesh
4 Replies
9. Shell Programming and Scripting
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies
10. Programming
Hello all,
i've written a small piece of code that will read commands from standard input and executes the commands.
Its working fine and is execting the commands well. Accepting arguments too. e.g
#mkdir <name of the directory>
The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 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)