Nagios - Misc

If we start nrpe as root, it may not work correctly if nrpe depends on some environment variable. To get around this issue, we must become the nagios user and start nrpe:

su -l nagios
/usr/local/nagios/libexec/nrpe -c /etc/nrpe.cfg -d

useradd nagios
Compile and install nagios plugins on the remote box
Compile and install nrpe on the remote box

./configure —enable-command-args
make all
cp src/nrpe /usr/local/nagios/libexec
cp src/check_nrpe /usr/local/nagios/libexec
cp sample-config/nrpe.cfg /etc
chown nagios.nagios /etc/nrpe.cfg

192.168.39.82
/usr/local/nagios/libexec/nrpe -c /etc/nrpe.cfg -d

NDO
./configure
make

/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg

PNP4Nagios

—enable-event-broker

echo -n "" > /usr/local/nagios/var/nagios.log
echo -n "" > /var/log/nagiosgraph.log
echo -n "" > /var/spool/nagios/perfdata.log
touch /var/spool/nagios/perfdata.log
chown nagios.nagios /var/spool/nagios/perfdata.log

/nagiosgraph/show.cgi?host=$HOSTNAME$&service=$ SERVICEDESC$&db=load,avg1min,avg5min,avg15min&geom=500x100&rrdopts=%2Dl%200%20%2Du %2010%20%2Dt%20CPU%2DLoa

When the daemon receives a request to return the results of <command_name>, it will execute the command specified by the <command_line> argument. Unlike Nagios, the command line cannot contains macros - it must be typed exactly as it should be executed.

Also note that you will have to modify the definitions below to match the argument format the plugins expect.

The following examples allow user-supplied arguments and can only be used if the NRPE daemon was compiled with support for command arguments *AND* the dont_blame_nrpe directive in this config file is set to '1'

command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$

In order to use the check_nrpe plugin, you'll have to define a few things in the host config file. (See the README file).

In any service definitions that use the nrpe plugin to get their results, you would set the service check command portion of the definition to:

check_command check_nrpe!yourcommand

where yourcommand is the name of a command that you define in your nrpe.cfg file on the remote host

http://192.168.39.82/nagiosgraph/cgi-bin/show.cgi?host=web1&service=CPU%20Usage
&db=cpu%2Cuser
&db=cpu%2Csys
&db=cpu%2Cnice
&db=cpu%2Cidle
&db=cpu%2Ciowait
&db=cpu%2Cirq
&db=cpu%2Csoftirq
&geom=
&rrdopts=db%3Dcpu%2Cuser%20
&rrdopts=db%3Dcpu%2Csys%20
&rrdopts=db%3Dcpu%2Cnice%20
&rrdopts=db%3Dcpu%2Ciowait%20
&rrdopts=db%3Dcpu%2Cidle%20
&rrdopts=db=cpu&fixedscale

select count(*),eStatus from cc_member where iMemberId in (SELECT clinicalcafe_iMemberId from quantros_users_clinicalcafe) group by eStatus;
select count(*),dDate from cc_member where iMemberId in (SELECT clinicalcafe_iMemberId from quantros_users_clinicalcafe) group by dDate;

http://subversion:8080/svn/clinicalcafe/branches/integration-15Jan2010
http://subversion:8080/svn/clinicalcafe/trunk

log
log-slow-queries
log-queries-not-using-indexes
long_query_time
log-warnings
log-error

section/member/get_twitter_tweet.php
clinical_cafe / iradcle

http://test.directmagazine.nl/features.php (Graphic and template is provided by his friend. Senthil work on the backend smarty)

This operation is not allowed
#toolbar=0&navpanes=0&scrollbar=0&pagemode=none&toolbar=0&statusbar=0&messages=0
#search="foo" // Display PDF in "find" mode
#page=n // Cause PDF to display page n
#navpanes=0

Set the style of the iframe to be invisible, and after it is loaded, set its style to visible again (The AddThis popup at the top should not be displayed behind the PDF. This is mostly an IE-only bug) See http://stackoverflow.com/questions/2476286/embedded-pdf-object-steals-focus-and-will-not-let-it-go
http://stackoverflow.com/questions/1631240/embedded-pdf-overlapping-menu-in-firefox
http://forums.mozillazine.org/viewtopic.php?f=25&t=595803&p=3115231

When we click on Share, can it open the menu in a regular popup window?
Use iframe inside iframe (the first iframe load an html page which embed the pdf)
Hack addthis so that when click it open the popup inside an iframe
Can we use swfobject to embed PDF?
Can we set the wmode for PDF?
Instead of iframe, use object or embed tags

http://www.gtalbot.org/FirefoxSection/Popup/PopupAndFirefox.html
http://www.456bereastreet.com/archive/200605/using_javascript_instead_of_target_to_open_new_windows/
http://www.vistaheads.com/forums/microsoft-public-internetexplorer-general/343053-cant-popup-new-window-instead-tab.html
http://www.eggheadcafe.com/software/aspnet/34165160/cant-popup-in-new-window.aspx

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License