Koozali.org: home of the SME Server

Nagios or other monitoring

Offline jameswilson

  • *
  • 792
  • +0/-0
    • Security Warehouse, trade security equipment
Nagios or other monitoring
« on: July 24, 2006, 02:32:11 AM »
Hi all sme fans.
I am trying to move everything off my old server (cent os) to sme cos i love it and its a dman site easier to manage than my old server. But i cant for the life of me get nagios accross. I have tried the rpm but obvioulsy that failed as its a el4 rpm and knows nothing of the ibay i want to put it in. I have tried compiling, added gcc and all seems ok, i told it about the ibay but god knows where its put the files!
All im trying to do is to monitor a few key servers http mainly but some mail servers also, nothing overly fancy. Is nagios overkill should i try something else. I looked a zabbix but it fails on mysql.h and i dont want to mess to much where im not 100% sure.

Basically i suppose im asking has anyone succesfully got nagios 2.5 working on sme, or do you have another monioring package of choice, either way would you mind sharing your knowledge??

Cheers
James

Offline brianr

  • *
  • 990
  • +2/-0
Nagios or other monitoring
« Reply #1 on: July 25, 2006, 01:21:53 PM »
I am also interested in Nagios under SME7, I used to use it under SME6, but as you say the SME6 rpm does not work, so I am currenlty running it on centos 4.3 box, and I have compiled all the programs, although not yet got the "trends" stuff to compile properly - some problems with the "gd", "png" and "jpeg" libraries.

Under Centos the default install is /usr/local/nagios perhaps your files are there?

It is my interntion to move the compiled system back to the SME7 box at some point, but I have little time at the moment.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

dswillia

Nagios or other monitoring
« Reply #2 on: July 26, 2006, 05:53:28 AM »

Offline jameswilson

  • *
  • 792
  • +0/-0
    • Security Warehouse, trade security equipment
Nagios or other monitoring
« Reply #3 on: July 26, 2006, 09:31:09 AM »
I looked at that as it looked pretty but i had problems with it and mysql. If anyone has got it running on sme then id love to know the process
James

Offline jameswilson

  • *
  • 792
  • +0/-0
    • Security Warehouse, trade security equipment
Nagios or other monitoring
« Reply #4 on: September 24, 2006, 01:24:07 AM »
Anyone any suggestions, cheers

Offline jonash

  • ****
  • 120
  • +0/-0
Nagios or other monitoring
« Reply #5 on: September 25, 2006, 07:06:58 AM »
I have used Big Brother, but not on SME.

It stores all data in files as default.
Lots of addons, to monitor almost everything.

It's free....


www.bb4.org



Jonas
.........

mej

Nagios or other monitoring
« Reply #6 on: September 25, 2006, 09:06:50 PM »
Quote from: "jonash"

It's free....


www.bb4.org

Jonas


...but only for non-commercial purposes.

BigSister and Nagios and manyothers are GPLfree

MeJ

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Zabbix
« Reply #7 on: September 29, 2006, 12:56:21 PM »
Hi

I got Zabbix 1.1.1 working on SME7
But I had to install a LOT of packages... and take NO NOTES (sorry!)

I've installed gcc and created static binaries to make an rpm but I'm w/o ANY time so this is stopped.

I can send a tar to anyone wishing to try and/or help with RPM.
Just ask me at jader &DOT& marasca $AT$ gmail #DOT# com .

Or try to download from: http://www.linuxfacil.net/publico/files/zabbix-1.1.1.tar
and a spec file (NOT TESTED) http://www.linuxfacil.net/publico/files/zabbix.spec

Good luck.

Jáder
...

Offline kmccarn

  • ****
  • 112
  • +0/-0
Nagios or other monitoring
« Reply #8 on: September 29, 2006, 01:11:30 PM »
I am going another direction entirely...

I am working with the vmware nagios appliance....

http://www.vmware.com/vmtn/appliances/directory/330

I haven't tried putting the vmware server on a SME yet - but once I get the nagios fully configured - it won't be hard to move.
Kevin in WV 8-)......

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Nagios or other monitoring
« Reply #9 on: September 29, 2006, 02:50:47 PM »
Quote from: "kmccarn"
I am going another direction entirely...

I am working with the vmware nagios appliance....

http://www.vmware.com/vmtn/appliances/directory/330

I haven't tried putting the vmware server on a SME yet - but once I get the nagios fully configured - it won't be hard to move.


For when you get around to putting VMware on your SME...

http://no.longer.valid/phpwiki/index.php/How-To%20install%20VMware%20free%20server%20on%20a%20SME%207.0%20Host
Regards,
William

IF I give advise.. It's only if it was me....

Offline andy_wismer

  • *
  • 107
  • +0/-0
    • ANWI-Net
Big Brother
« Reply #10 on: November 22, 2006, 09:49:13 PM »
As an old "Brother" who's used big brother for more than 8 years now (!) here's my 2 c$:

If anyone's interested, I do have a few big-brother installations running on various sme 6/7 servers. It does run well.

I can also provide a raw how-to, works for both versions (6.0.1 and 7.0 final)...

At least until I figure out how to du a mass-rollout of Nagios or something else on SME, GPLed would be a requirement on my side  ;-)

The setup entails password https access to the bb web-pages, custom-templates

In some setups bb monitors Linux, Solaris, MacOS, MAc OS X (both!) Windoze, SME and stuff like switches, cameras, wireless-aps, etc..

If anyone wants to see my productive bb system I'm using:

https://www.anwi.net/bb/

User: sme-bb
Password: contribs

This will only be open till sometime in December, after that it's closed again...

SME is a cool Server, my thanks to the creators/developers and all who contribute!

Andy

drywalldude

cacti and nagios
« Reply #11 on: November 26, 2006, 01:54:09 PM »
I just got cacti up and running with snmp support on my sme7 box. Cacti alone might meet your needs, but there is a lot of work going on integration of cacti and nagios here:  http://forums.cacti.net/about15267.html

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Zabbix
« Reply #12 on: October 04, 2007, 10:44:53 PM »
Hi

I got Zabbix 1.1.1 working on SME7
But I had to install a LOT of packages... and take NO NOTES (sorry!)

I've installed gcc and created static binaries to make an rpm but I'm w/o ANY time so this is stopped.

I can send a tar to anyone wishing to try and/or help with RPM.
Just ask me at jader &DOT& marasca $AT$ gmail #DOT# com .

Or try to download from: http://www.linuxfacil.net/publico/files/zabbix-1.1.1.tar
and a spec file (NOT TESTED) http://www.linuxfacil.net/publico/files/zabbix.spec

Good luck.

Jáder

Whould you give detail...how to start install ZABBIC..
i'm very interesting
regards

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios or other monitoring
« Reply #13 on: October 06, 2007, 04:47:21 AM »
Hi All,

We have a working nagios on SME 7. See below for the instructions. or you can follow from this link http://forums.contribs.org/index.php?topic=35760.0

Installing Nagios 2.9 on SME 7.1.3
First enable repo on Dag's

1. wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
2. rpm --import RPM-GPG-KEY.dag.txt
3. From console do:
   /sbin/e-smith/db yum_repositories set dag repository \
   Name 'Dag - EL4' \
   BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \
   EnableGroups no \
   GPGCheck yes \
   GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
   Visible no \
   Exclude freetype,htop,iptraf,rsync,syslinux \
   status disabled

4. expand-template /etc/yum.conf

Installing

1. yum --enablerepo=dag install nagios*
2. signal-event post-upgrade And signal-event reboot
3. mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
4. cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
5. vi 92nagios
6. paste this the code below and save/exit

{
    $OUT = "";
    my $allow = 'all';
    my $pass = '0';
    my $satisfy = 'all';
    my $name = $nagios{'Name'} || 'Nagios';
   
    for ('exit-if-none')
    {
      if ($nagios{'PublicAccess'})
      {
          if ($nagios{'PublicAccess'} eq 'none')
          {
           next;
          }
          elsif ($nagios{'PublicAccess'} eq 'local')
          {
            $allow   = $localAccess;
            $pass    = 0;
            $satisfy = 'all';
          }
          elsif ($nagios{'PublicAccess'} eq 'local-pw')
          {
            $allow   = $localAccess;
            $pass    = 1;
            $satisfy = 'all';
          }
          elsif ($nagios{'PublicAccess'} eq 'global')
          {
            $allow   = 'all';
            $pass    = 0;
            $satisfy = 'all';
          }
          elsif ($nagios{'PublicAccess'} eq 'global-pw')
          {
            $allow   = 'all';
            $pass    = 1;
            $satisfy = 'all';
          }
          elsif ($nagios{'PublicAccess'} eq 'global-pw-remote')
          {
            $allow   = $localAccess;
            $pass    = 1;
            $satisfy = 'any';
          }
      }
     
      $OUT .= "#------------------------------------------------------------\n";
      $OUT .= "# nagios - $name\n";
      $OUT .= "#------------------------------------------------------------\n";
     
      {
        if (exists $nagios{'URL'})
        { $OUT .= "Alias  /$nagios{'URL'}  /usr/share/nagios\n"; }
      }
     
      $OUT .= "Alias  /nagios/cgi-bin  /usr/lib/nagios/cgi\n";
      $OUT .= "\n";
      $OUT .= "<Directory /usr/lib/nagios/cgi>\n";
      $OUT .= "    options ExecCGI\n";
      $OUT .= "    order deny,allow\n";
      $OUT .= "    deny from all\n";
      $OUT .= "    allow from $allow\n";
      if ($pass)
      {
          $OUT .= "    AuthName \"$name\"\n";
          $OUT .= "    AuthType Basic\n";
          $OUT .= "    AuthExternal pwauth\n";
          $OUT .= "    Satisfy $satisfy\n";
      }
      $OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
      $OUT .= "</Directory>\n";

      $OUT .= "Alias  /nagios  /usr/share/nagios\n";
      $OUT .= "\n";
      $OUT .= "<Directory /usr/share/nagios>\n";
      $OUT .= "    order deny,allow\n";
      $OUT .= "    deny from all\n";
      $OUT .= "    allow from $allow\n";
      if ($pass)
      {
          $OUT .= "    AuthName \"$name\"\n";
          $OUT .= "    AuthType Basic\n";
          $OUT .= "    AuthExternal pwauth\n";
          $OUT .= "    require valid-user\n";
          $OUT .= "    Satisfy $satisfy\n";
      }
      $OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
      $OUT .= "</Directory>\n";
    }
}

7. config set nagios service Name Nagios PublicAccess local-pw
8. expand-template /etc/httpd/conf/httpd.conf

restarting httpd
9.   /etc/rc7.d/S86httpd-e-smith restart
10. /etc/rc7.d/S86httpd-admin restart

you'll need to setup nagios first, so go edit your /etc/nagios/<files> and then do a
10./etc/init.d/nagios start

To automatic start nagios

11. ln -s /etc/init.d/nagios /etc/rc.d/rc7.d/S99nagios


Pre-flight Check nagios configuration

1.  /usr/bin/nagios -v /etc/nagios/nagios.cfg
or
nagios -v /etc/nagios/nagios.cfg

Right now you can access nagios thru this link https://your-server-ip-address/nagios



Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #14 on: October 06, 2007, 10:25:14 PM »
i'm stop in command
expand-template /etc/httpd/conf/httpd.conf

because
WARNING in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/92nagios: ERROR: Cannot process template /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/92nagios: Unmatched close brace at line 90
 at /sbin/e-smith/expand-template line 45

how to make it better ?
when i push until finish, the result only

Not Found

The requested URL /nagios was not found on this server.
« Last Edit: October 06, 2007, 10:28:28 PM by sedangbelajar »

Offline shawnbishop

  • *****
  • 298
  • +0/-0
Re: Nagios or other monitoring
« Reply #15 on: October 07, 2007, 08:01:40 AM »
This is the first how to posted by a member that actually works...

Fantastic, I can deploy this on all my other SME installations now...!!

Thanks

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios or other monitoring
« Reply #16 on: October 08, 2007, 12:27:12 AM »
WARNING in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/92nagios: ERROR: Cannot process template /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/92nagios: Unmatched close brace at line 90 at /sbin/e-smith/expand-template line 45
Looks like you had a problem with the cut & paste. You may have missed the first '{' or last '}'.

Trevor B

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Nagios or other monitoring
« Reply #17 on: October 08, 2007, 10:15:10 AM »
I find it much easier to cut-and-paste into  a file using 'pico -w' then using 'vi' - vi automatically indents, so when I cut and paste the output usually doesn't look like the input.  pico, on the other hand, does NOT automatically indent... (but without the "-w" it will automatically wrap long lines, causing another set of problems...).

Which is by way of saying that if deleting the last } in 92nagios doesn't do the trick, I'd try recreating the file using pico -w 92nagios
« Last Edit: October 08, 2007, 10:17:18 AM by mmccarn »

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #18 on: October 09, 2007, 01:16:47 AM »
Looks like you had a problem with the cut & paste. You may have missed the first '{' or last '}'.

Trevor B

i'm re-install sme server and try to install nagios again..there are no error after install until finish.
and i can start nagios, but inthe confguration they said :

It appears as though you do not have permission to view the configuration information you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.

what is this ??
« Last Edit: October 09, 2007, 01:26:29 AM by sedangbelajar »

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios or other monitoring
« Reply #19 on: October 09, 2007, 03:16:18 AM »
Hi,

Quote
i'm re-install sme server and try to install nagios again..there are no error after install until finish.
and i can start nagios, but inthe confguration they said :

It appears as though you do not have permission to view the configuration information you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.

what is this ??


Just check on nagios.cfg file you have to do some changes in there look for for this text below:

check_external_commands=0

what we do here is change 0 to 1, but you should read first the manual for nagios regarding this thing for you to understand.


Regards,
Rocel

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #20 on: October 09, 2007, 04:02:45 AM »
Hi,


Just check on nagios.cfg file you have to do some changes in there look for for this text below:

check_external_commands=0

what we do here is change 0 to 1, but you should read first the manual for nagios regarding this thing for you to understand.


Regards,
Rocel

i'm change in the nagios.cfg like the example, but nothing happen. there are no everything in my nagios..



Help me
« Last Edit: October 09, 2007, 04:07:05 AM by sedangbelajar »

Offline okepc

  • ****
  • 118
  • +0/-0
    • http://www.okepc.nl
Re: Nagios or other monitoring
« Reply #21 on: October 09, 2007, 11:11:19 AM »
Did you restart the nagios service ?

regards

Dirk

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios or other monitoring
« Reply #22 on: October 09, 2007, 11:47:47 AM »
Who did you log in as?

It shows 'Logged in as ?'

AFAIK, you need to be an authenticated user to have any access. I assume that you have set all of the authorised_for parameters in your /etc/nagios/cgi.cfg as *

Trevor B

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #23 on: October 09, 2007, 03:34:57 PM »
Did you restart the nagios service ?

regards

Dirk

Dear doc team

after change number from 0 to 1
i'm restart again from the following number

restarting httpd
9.   /etc/rc7.d/S86httpd-e-smith restart
10. /etc/rc7.d/S86httpd-admin restart

you'll need to setup nagios first, so go edit your /etc/nagios/<files> and then do a
10./etc/init.d/nagios start

To automatic start nagios

11. ln -s /etc/init.d/nagios /etc/rc.d/rc7.d/S99nagios


Pre-flight Check nagios configuration

1.  /usr/bin/nagios -v /etc/nagios/nagios.cfg
or
nagios -v /etc/nagios/nagios.cfg



but no respon in my browser...

regards

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #24 on: October 09, 2007, 03:40:20 PM »
Who did you log in as?

It shows 'Logged in as ?'

AFAIK, you need to be an authenticated user to have any access. I assume that you have set all of the authorised_for parameters in your /etc/nagios/cgi.cfg as *

Trevor B

i'm using https://.....the i'm logged in as admin


because i'm not see that from example "Posted by: kryptos", how can i configure the /etc/nagios/cgi.cfg as *


regrads
« Last Edit: October 09, 2007, 06:30:30 PM by sedangbelajar »

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios or other monitoring
« Reply #25 on: October 10, 2007, 12:04:09 AM »
because i'm not see that from example "Posted by: kryptos", how can i configure the /etc/nagios/cgi.cfg as *
It, and the other *.cfg files,  can NOT be configured through the web interface (they should all require some tweaking). You need to log in as root to your servers console (or via ssh) and edit those files. (this is in the nagios documentation).
Code: [Select]
#root@fred ~> cd /etc/nagios
#root@fred /etc/nagios> nano cgi.cfg
ctrl-o (to save)
ctrl-x (to exit)
Also check that any users/groups mentioned in any of the *.cfg files exist on your server (default users are nagios, nagios-admin and group nagios).

Nagios is a very 'hands-on' package and will require a fair amount of work at the command-line. Whilst I have managed to configure monarch (a web front-end), that took at lot more command-line effort than should be necessary...

Trevor B

Offline sedangbelajar

  • **
  • 30
  • +0/-0
Re: Nagios or other monitoring
« Reply #26 on: October 10, 2007, 04:18:58 AM »
It, and the other *.cfg files,  can NOT be configured through the web interface (they should all require some tweaking). You need to log in as root to your servers console (or via ssh) and edit those files. (this is in the nagios documentation).
Code: [Select]
#root@fred ~> cd /etc/nagios
#root@fred /etc/nagios> nano cgi.cfg
ctrl-o (to save)
ctrl-x (to exit)
Also check that any users/groups mentioned in any of the *.cfg files exist on your server (default users are nagios, nagios-admin and group nagios).

Nagios is a very 'hands-on' package and will require a fair amount of work at the command-line. Whilst I have managed to configure monarch (a web front-end), that took at lot more command-line effort than should be necessary...

Trevor B

i'll try to configure your suggest from "putty" or "ssh" then from root i'm using "vi" or "pico", but the problem i can not see example how to configure cgi.cfg..
maybe someone can give me example, because i'm  a newbie in linux..sometimes i do not understand if i can see the example..

regards

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios or other monitoring
« Reply #27 on: October 10, 2007, 04:32:33 AM »
i'll try to configure your suggest from "putty" or "ssh" then from root i'm using "vi" or "pico", but the problem i can not see example how to configure cgi.cfg..
maybe someone can give me example, because i'm  a newbie in linux..sometimes i do not understand if i can see the example..
As I stated above, and as outlined in the nagios documentation under "Advice to beginners"
Quote from: Advice to beginners
Advice for Beginners

Congrats on choosing to try Nagios! Nagios is quite powerful and flexible, but unfortunately its not very friendly to newbies. Why? Because it takes a lot of work to get it installed and configured properly. That being said, if you stick with it and manage to get it up and running, you'll never want to be without it. :-) Here are some very important things to keep in mind for those of you who are first-time users of Nagios:

   1. Relax - its going to take some time. Don't expect to be able to compile Nagios and start it up right off the bat. Its not that easy. In fact, its pretty difficult. If you don't want to spend time learning how things work and getting things running smoothly, don't bother using this software. Instead, pay someone to monitor your network for you or hire someone to install Nagios for you. :-)

   2. Read the documentation. Nagios is difficult enough to configure when you've got a good grasp of what's going on, and nearly impossible if you don't. Do yourself a favor and read before blindly attempting to install and run Nagios. If you're the type who doesn't want to take the time to read the documentation, you'll probably find that others won't find the time to help you out when you have problems. RTFM.

   3. Use the sample config files. Sample configuration files are provided with Nagios. Look at them, modify them for your particular setup and test them! The sample files are just that - samples. There's a very good chance that they won't work for you without modifications. Sample config files can be found in the sample-config/ subdirectory of the Nagios distribution.

   4. Seek the help of others. If you've read the documentation, reviewed the sample config files, and are still having problems, try sending a descriptive email message describing your problems to the nagios-users mailing list. Due to the amount of work that I have to do for this project, I am unable to answer most of the questions that get sent directly to me, so your best source of help is going to be the mailing list. If you've done some background reading and you provide a good problem description, odds are that someone will give you some pointers on getting things working properly.
The nagios documentation can be found @ http://www.nagios.org/docs/. I have 2.9 installed (have not tried the 3 series yet).

On my setup, I just set all of the parameters that started with 'authorised_for' to '*'

Good Luck
Trevor B