Koozali.org: home of the SME Server

Nagios on SME7 Yet?

CKConsulting

Nagios on SME7 Yet?
« on: February 18, 2007, 06:05:52 AM »
Anyone have Nagios running on SME7 yet?

Rick

infinix

Nagios on SME
« Reply #1 on: February 18, 2007, 07:40:17 PM »
This worked for me, didn't have time to compile and stuff credit to linuxfacil.net:-

1) Create an zabbix user (using LAT or server-manager)

2) download my tar http://www.linuxfacil.net/publico/files/Zabbix-1.1.1.tar or from http://khunjarnet.com/downloads/zabbix/Zabbix-1.1.1.tar (thank Jon)

3) copy files from opt to /opt and etc to /etc

NOTE: Instruction 4 below did not apply to me as I have /opt hosting all my web-enable applications.

4) create fragments to Apache

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cat >>/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/80zabbix <<FIM
Code:

Alias /zabbix /opt/zabbix

<Directory "/opt/zabbix">
    AddType application/x-httpd-php .php .php3 .phtml
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
FIM


/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

5) create MySQL database and populate it
mysql < install/create_mysql
mysql zabbix < install/schema.sql
mysql zabbix < install/data.sql

6) edit /etc/zabbix/zabbix_[server/agentd].conf and verify if everything it´s ok

7) start Zabbix_server and agentd
/opt/zabbix/bin/zabbix_server
/opt/zabbix/bin/zabbix_agentd

Offline JonB

  • *
  • 351
  • +0/-0
Nagios on SME7 Yet?
« Reply #2 on: February 18, 2007, 09:35:03 PM »
I do have Zabbix 1.1.3 binaries compiled which I am currently using. In the next couple of days I plan to fire up my test system and compile the new 1.1.6 binaries.

Jon
...

CKConsulting

Nagios on SME7 Yet?
« Reply #3 on: February 19, 2007, 03:39:34 AM »
Thanks,  I'll look at zabbix.

I'm looking to have clients report back over the WAN. Do you know if I can do this without opening up ports on the Client side?

Rick

CKConsulting

Nagios on SME7 Yet?
« Reply #4 on: February 20, 2007, 02:44:37 AM »
Thanks, Zabbix is installed and some what running.  I have having a couple of issues.

1.  REVISED  I just figure out my Zabbix_server/_agentd are not starting do to Permissions denied.

2. Window agent is reporting Active Checks (Cannot connect to (192.168.9.73:10051) (No error)
This is just a pc on the same lan as my SME7.1 server in server only mode.

3.  I created a host in zabbix PC1.  When I select Inventory Host profiles.
It reports "Profile for this host is missing"

I'm willing to pay for some one's time to help me get this up and running.

Thanks,
Rick

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios on SME7 Yet?
« Reply #5 on: April 16, 2007, 05:29:59 AM »
Quote from: "CKConsulting"
Anyone have Nagios running on SME7 yet?

Yes, but don't have a contrib yet.

Nagios installs fairly easily (yum --enablerepo=base install nagios*), but you need to add a template for httpd.conf that aligns with smeserver and a link for starting it.

Will post my template tonight and may get around to packaging them (soon... :-)

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Nagios on SME7 Yet?
« Reply #6 on: April 16, 2007, 12:01:24 PM »
Quote from: "TrevorB"
Nagios installs fairly easily (yum --enablerepo=base install nagios*)
Well it does, but not from that repository. I actually downloaded it from the dag repository (http://wiki.contribs.org/Dag).
Code: [Select]
yum --enablerepo=dag install nagios*Which will install nagios & nagios-plugins.

You will need to create a template fragment for httpd.conf called 92nagios in /etc/e-smith/templates-custom/etc/httpd/conf/httpd-conf/. I like to use the same style that Shad Lords uses for his webapps. This allows me to manage them via the config database.
So my 92nagios looks like this.
Code: [Select]
{
    $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";
    }
}
You will need to setup the config database items, expand the httpd.conf file and then restart httpd
Code: [Select]
config set nagios service Name Nagios PublicAccess local-pw
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart
You'll need to setup nagios first, so go edit your /etc/nagios/<files> and then do a
Code: [Select]
/etc/init.d/nagios start

This is all from memory and looking at my setup (which is working nicely).

Good Luck
Trevor B

Simonvetterli

Nagios on SME7 Yet?
« Reply #7 on: May 16, 2007, 08:20:25 PM »
where do I have to setup nagios? Is there any files I can check?

I don't habe a file or directory /usr/share/nagios

Kind Regards.

Simon

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Nagios on SME7 Yet?
« Reply #8 on: May 17, 2007, 03:04:34 AM »
Quote from: "Simonvetterli"
where do I have to setup nagios? Is there any files I can check?

Quote from: "TrevorB"
You'll need to setup nagios first, so go edit your /etc/nagios/<files>


I also created a user nagios, I'm not sure if it's necessary (correct me here if I'm wrong):

Code: [Select]
db accounts set nagios user PasswordSet no ForwardAddress admin
signal-event user-create nagios
db accounts setprop nagios Shell /bin/bash
chsh -s /bin/bash nagios

Simonvetterli

Nagios on SME7 Yet?
« Reply #9 on: May 17, 2007, 08:18:19 AM »
it's working now

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #10 on: August 18, 2007, 06:13:13 AM »
Hi All,

We already have it working but our main problem is how do we start it automatically during startup?


Regards,
Rocel

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Nagios on SME7 Yet?
« Reply #11 on: August 18, 2007, 03:45:22 PM »
Add the startup command to the end of /etc/rc.local and let us know if it works.

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #12 on: August 21, 2007, 11:56:27 AM »
Hi,

Can you show me what file or command i will use?  I tried linking /etc/init.d/nagios to /etc/rc.d/rc2.d/S99nagios but still can't start automatically.

Regards,
Rocel

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Nagios on SME7 Yet?
« Reply #13 on: August 21, 2007, 03:29:29 PM »
I usualy link to etc/rc.d/rc7.d/

SME runs on start level 7!!

...

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #14 on: August 22, 2007, 04:47:09 AM »
I usualy link to etc/rc.d/rc7.d/

SME runs on start level 7!!




Thank you it works now!

Regards,
Rocel

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Nagios on SME7 Yet?
« Reply #15 on: August 22, 2007, 02:58:25 PM »
Your´re welcome.

I´m using ZABBIX... seems easier... but would like to know your thought about NAGIOS. Please share it here if possible.

Jáder
...

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #16 on: August 23, 2007, 05:34:13 AM »
hi,

It just that we use it before since version 1.2 and we already familiar with some of its functionality.I haven't tried with Zabbix though ill try it soon. But as of now we are contented with Nagios. We are still on a study of refining it email notifications because we want to minimize its email alert notification and we have some ideas that if it is possible that we could send alerts through SMS. I don't if Zabbix has that capabilties.

Regards,
Rocel

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Nagios on SME7 Yet?
« Reply #17 on: November 13, 2007, 09:45:39 PM »
I have built a Nagios contrib for easy installation on SME 7.
see http://wiki.contribs.org/Nagios

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #18 on: November 14, 2007, 07:19:30 AM »
I have built a Nagios contrib for easy installation on SME 7.
see http://wiki.contribs.org/Nagios

michael,

after installing...

./install.sh central

I can't access all webpages on ibays anymore including Primary ibays
however i can access all webpages installed in /opt

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Nagios on SME7 Yet?
« Reply #19 on: November 14, 2007, 04:30:47 PM »
I can't access all webpages on ibays anymore including Primary ibays

Thomas,
I have found the bug and working on a fix. Meanwhile do the follwing to repair your system:
Login as root and run
Code: [Select]
/usr/bin/yum -y erase smeserver-nagiosIn the servermanger go to 'Administration'->'Reboot or shutdown' and run 'Reconfigure'

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
smeserver-nagios-complete-1.0.1
« Reply #20 on: November 14, 2007, 05:15:19 PM »
The fixed version smeserver-nagios-complete-1.0.1 is on the way to the mirrors. Install it as described in the Wiki. No need to uninstall anything first.

Offline FraunhoferIFF

  • *
  • 932
  • +0/-0
  • Widerstand ist Zwecklos !
    • http://www.magic-figo.de
Re: Nagios on SME7 Yet?
« Reply #21 on: November 15, 2007, 06:16:47 PM »
Uninstall ?


Marcel

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Nagios on SME7 Yet?
« Reply #22 on: November 19, 2007, 07:41:24 AM »
Uninstall ?


Marcel

Yes, how to uninstall..
I want to remove nagios from my smeserver..
Wiki and install does not mention uninstalling..
thanks..

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Nagios on SME7 Yet?
« Reply #23 on: November 19, 2007, 08:50:59 PM »
Wiki and install does not mention uninstalling..
I have reworked the installation instructions and included an uninstall chapter.