Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: CKConsulting on February 18, 2007, 06:05:52 AM
-
Anyone have Nagios running on SME7 yet?
Rick
-
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
-
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
-
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
-
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
-
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... :-)
-
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).
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.
{
$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 httpdconfig 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/etc/init.d/nagios start
This is all from memory and looking at my setup (which is working nicely).
Good Luck
Trevor B
-
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
-
where do I have to setup nagios? Is there any files I can check?
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):
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
-
it's working now
-
Hi All,
We already have it working but our main problem is how do we start it automatically during startup?
Regards,
Rocel
-
Add the startup command to the end of /etc/rc.local and let us know if it works.
-
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
-
I usualy link to etc/rc.d/rc7.d/
SME runs on start level 7!!
-
I usualy link to etc/rc.d/rc7.d/
SME runs on start level 7!!
Thank you it works now!
Regards,
Rocel
-
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
-
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
-
I have built a Nagios contrib for easy installation on SME 7.
see http://wiki.contribs.org/Nagios
-
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
-
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
/usr/bin/yum -y erase smeserver-nagios
In the servermanger go to 'Administration'->'Reboot or shutdown' and run 'Reconfigure'
-
The fixed version smeserver-nagios-complete-1.0.1 is on the way to the mirrors. Install it as described in the Wiki (http://wiki.contribs.org/Nagios). No need to uninstall anything first.
-
Uninstall ?
Marcel
-
Uninstall ?
Marcel
Yes, how to uninstall..
I want to remove nagios from my smeserver..
Wiki and install does not mention uninstalling..
thanks..
-
Wiki and install does not mention uninstalling..
I have reworked the installation instructions and included an uninstall chapter.