LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios Setup Errors (https://www.linuxquestions.org/questions/linux-software-2/nagios-setup-errors-4175427971/)

\/4A 09-19-2012 06:48 AM

Nagios Setup Errors
 
Hello, I'm trying to install Nagios 3.4.1 on a remote Ubuntu 12.04 server (built from minimal edition).

I'm following instructions on http://assets.nagios.com/downloads/n...rom_Source.pdf
but on the very first step
Code:

sudo apt-get install wget install build-essential apache2 php5-gd wget wibgd2-xpm libgd2-xpm-dev
libapache2-mod-php5

it seems to give me the following error
Code:

root@oemrserver:~# apt-get install wget install build-essential apache2 php5-gd wget wibgd2-xpm libgd2-xpm-dev libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package install
E: Unable to locate package wibgd2-xpm
root@oemrserver:~#

I believe I already have PHP5 and Apache installed on the server.

Would really appreciate some help on this, pls.

acid_kewpie 09-19-2012 06:59 AM

Hmm, that's a very stupid command, how on earth is that in a document? I'd not use that any more.

from this - http://packages.ubuntu.com/quantal/nagios3 - I presume that you can just do a "sudo apt-get install nagios3 nagios3-cgi nagios3-core" and everything else will take care of itself.

NB. Nagios is rubbish.

\/4A 09-19-2012 07:08 AM

Quote:

Originally Posted by acid_kewpie (Post 4784062)
NB. Nagios is rubbish.

Seriously?? What would you recommend - I just need something simple and especially something that would alert me of server problems like hardware about to fail.

acid_kewpie 09-19-2012 07:14 AM

Well *I* think it's garbage but it's amazingly popular and does what most people want from it (as long as they do all the hard work themselves). How do you expect to know about things that are "about to fail" in the first place? That's not trivial.

\/4A 09-19-2012 08:30 AM

I've just realized why I'm having issues with installing Nagios.

While I can access this virtual machine (the Ubuntu Server) from the LAN, the Ubuntu server cannot seem to access the internet. Even if I try pinging
Code:

:~$ ping google.com
ping: unknown host google.com

Same thing with any IP number.

From any PC on the LAN I can ping into the Ubuntu server and I can even SSH into it.Surprisingly, it tells me there are 10 security updates available:confused:

Habitual 09-19-2012 11:41 AM

Quote:

Originally Posted by \/4A (Post 4784070)
Seriously?? What would you recommend - I just need something simple and especially something that would alert me of server problems like hardware about to fail.

I replaced Icinga+Cacti at our shop with Zabbix and it's been wonderful.

I haven't seen any software that can tell me when a host is "about to fail" but I am extremely sheltered and don't get out much...

Good Luck.

\/4A 09-20-2012 02:25 AM

Thanks guys.

What I actually meant by "about to fail" was in relation to what some software already offer: - features like alerting when CPU temp goes too high, hard drive temp goes too high and the likes.

acid_kewpie 09-20-2012 02:54 AM

one of the fundamental things about nagios is that it can monitor *any* value at all, by virtue of you having to go write a script to dig out the information you want and make that judgement call within your script. That's either a wonderful thing, or an awful thing, and I'm in the latter. So if you are happy bridging the gap between nagios dumbly running a script it's told and making that script do whatever it is that you want to base it on, then go nagios. It's just that Nagios need to be explicitly told to jump, or not, by independently written scirpts, and nagios itself is just totally dumb from there.

You can compare this to a decent SNMP aware tool like Zabbix (which I'm not actually familiar with) and you can directly tell the service to monitor this cpu oid, that disk space oid and report if they go above of below this or that, without that responsibility leaving the core platform at all.

\/4A 09-20-2012 03:40 AM

Quote:

Originally Posted by acid_kewpie (Post 4784844)
one of the fundamental things about nagios is that it can monitor *any* value at all, by virtue of you having to go write a script to dig out the information you want and make that judgement call within your script. That's either a wonderful thing, or an awful thing, and I'm in the latter. So if you are happy bridging the gap between nagios dumbly running a script it's told and making that script do whatever it is that you want to base it on, then go nagios. It's just that Nagios need to be explicitly told to jump, or not, by independently written scirpts, and nagios itself is just totally dumb from there.

You can compare this to a decent SNMP aware tool like Zabbix (which I'm not actually familiar with) and you can directly tell the service to monitor this cpu oid, that disk space oid and report if they go above of below this or that, without that responsibility leaving the core platform at all.

Looks like I'm on your side, Chris.
I'm skipping Nagios and giving a go at Zabbix. I'm definitely not into having to code for every single thing I need.

\/4A 09-20-2012 07:20 AM

1 Attachment(s)
OK, so I installed Zabbix 1.8 (chose 1.8 so I could install it using apt) with the command
Code:

sudo apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-agent
went through the whole process, setup admin and frontend passwords, etc.. and process completed.
However, now when I try to log into the frontend with http://192.168.0.107/zabbix
instead of getting the zabbix login screen, I get
Code:

You are not logged in.
You cannot view this URL as a guest. You must login to view this page.
If you think this message is wrong, please consult your administrators about getting the necessary permissions.

    mysql_connect(): Access denied for user 'zabbix'@'localhost' (using password: YES) [include/db.inc.php:58]

Even if I click on Login, the same page reloads. I've attached a screenshot.

acid_kewpie 09-20-2012 07:25 AM

well if there's a mysql permissions error you obviously need to fix that. 5 seconds on google brought up this - http://www.zabbix.com/wiki/howto/ins...g_the_mysql_db, you really should have already found this yourself though...

Habitual 09-20-2012 07:57 AM

terminal>
Code:

mysql -uzabbix -p -e "show databases;"
should tell you if the mysql permission is good, or not.

\/4A 09-20-2012 09:16 AM

Quote:

Originally Posted by Habitual (Post 4785039)
terminal>
Code:

mysql -uzabbix -p -e "show databases;"
should tell you if the mysql permission is good, or not.

Thanks.
This is the result:
Code:

~$ sudo mysql -uzabbix -p -e "show databases";
Enter password:
+--------------------+
| Database          |
+--------------------+
| information_schema |
| test              |
| zabbix            |
+--------------------+

Is there a way I can set the permissions error(s) through Webmin?

I went through http://www.zabbix.com/wiki/howto/ins...g_the_mysql_db and while
Code:

service mysqld status
resulted in
Code:

mysqld: unrecognized service
I went straight to
Code:

mysql> create database zabbix character set utf8;
to see if the database existed and yes it did!

I then went ahead to set permissions:
Code:

mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'set-password-here';
mysql> quit;

and then skipped to see if the database was working:
Code:

mysql> use zabbix;
mysql> show tables;
mysql> quit;

The result:
Code:

mysql> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------------+
| Tables_in_zabbix      |
+-----------------------+
| acknowledges          |
| actions              |
| alerts                |
| applications          |
| auditlog              |
| auditlog_details      |
| autoreg_host          |
| conditions            |
| config                |
| dchecks              |
| dhosts                |
| drules                |
| dservices            |
| escalations          |
| events                |
| expressions          |
| functions            |
| globalmacro          |
| graph_theme          |
| graphs                |
| graphs_items          |
| groups                |
| help_items            |
| history              |
| history_log          |
| history_str          |
| history_str_sync      |
| history_sync          |
| history_text          |
| history_uint          |
| history_uint_sync    |
| hostmacro            |
| hosts                |
| hosts_groups          |
| hosts_profiles        |
| hosts_profiles_ext    |
| hosts_templates      |
| housekeeper          |
| httpstep              |
| httpstepitem          |
| httptest              |
| httptestitem          |
| ids                  |
| images                |
| items                |
| items_applications    |
| maintenances          |
| maintenances_groups  |
| maintenances_hosts    |
| maintenances_windows  |
| mappings              |
| media                |
| media_type            |
| node_cksum            |
| nodes                |
| opconditions          |
| operations            |
| opmediatypes          |
| profiles              |
| proxy_autoreg_host    |
| proxy_dhistory        |
| proxy_history        |
| regexps              |
| rights                |
| screens              |
| screens_items        |
| scripts              |
| service_alarms        |
| services              |
| services_links        |
| services_times        |
| sessions              |
| slides                |
| slideshows            |
| sysmaps              |
| sysmaps_elements      |
| sysmaps_link_triggers |
| sysmaps_links        |
| timeperiods          |
| trends                |
| trends_uint          |
| trigger_depends      |
| triggers              |
| user_history          |
| users                |
| users_groups          |
| usrgrp                |
| valuemaps            |
+-----------------------+
88 rows in set (0.02 sec)

mysql> quit
Bye


zeroquaranta 01-04-2013 05:58 AM

I've used the same tutorial and got the same error.
I believe there's a typo.
Try removing the second 'install'

Quote:

Originally Posted by \/4A (Post 4784056)
Hello, I'm trying to install Nagios 3.4.1 on a remote Ubuntu 12.04 server (built from minimal edition).

I'm following instructions on http://assets.nagios.com/downloads/n...rom_Source.pdf
but on the very first step
Code:

sudo apt-get install wget install build-essential apache2 php5-gd wget wibgd2-xpm libgd2-xpm-dev
libapache2-mod-php5

it seems to give me the following error
Code:

root@oemrserver:~# apt-get install wget install build-essential apache2 php5-gd wget wibgd2-xpm libgd2-xpm-dev libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package install
E: Unable to locate package wibgd2-xpm
root@oemrserver:~#

I believe I already have PHP5 and Apache installed on the server.

Would really appreciate some help on this, pls.



All times are GMT -5. The time now is 07:17 PM.