LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-28-2005, 06:01 AM   #1
apenguinlinux
Member
 
Registered: Dec 2004
Distribution: debian
Posts: 91

Rep: Reputation: 15
nagios-installations,,,,


hi all
how can i run nagios on Debian .

i have done following this
#apt-get install nagios-text

after that
#nagios -v /etc/nagios/nagios.cfg

the out put is

Nagios 1.3
Copyright (c) 1999-2004 Ethan Galstad (nagios@nagios.org)
Last Modified: 10-24-2004
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 1 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 1 service escalations.
Checking host group escalations...
Checked 0 host group escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 104 commands.
Checking time periods...
Checked 4 time periods.
Checking for circular paths between hosts...
Checking for circular service execution dependencies...
Checking global event handlers...
Checking obsessive compulsive service processor command...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


But it is not exactly running ,,
the syslog is



ebian:~# tail -f /var/log/syslog
Oct 28 16:03:07 debian -- MARK --
Oct 28 16:04:47 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.99.1 port 67
Oct 28 16:04:47 debian dhclient-2.2.x: DHCPACK from 192.168.99.1
Oct 28 16:04:47 debian dhclient-2.2.x: bound to 192.168.99.34 -- renewal in 18000 seconds.
Oct 28 16:08:02 debian /USR/SBIN/CRON[832]: (mail) CMD ( if [ -x /usr/lib/exim/exim3 -a -f /etc/exim/exim.conf ]; then /usr/lib/exim/exim3 -q ; fi)
Oct 28 16:14:44 debian nagios: Error: Cannot open main configuration file '/root/-' for reading!
Oct 28 16:14:44 debian nagios: Nagios 1.3 starting... (PID=1177)
Oct 28 16:14:44 debian nagios: Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=1177)
Oct 28 16:17:01 debian /USR/SBIN/CRON[1245]: (root) CMD ( run-parts --report /etc/cron.hourly)
Oct 28 16:23:01 debian /USR/SBIN/CRON[1283]: (mail) CMD ( if [ -x /usr/lib/exim/exim3 -a -f /etc/exim/exim.conf ]; then /usr/lib/exim/exim3 -q ; fi)


==============
so please help me ,,,


what can i do ....


Thanks
 
Old 10-28-2005, 08:44 AM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Your best bet is to head over to the nagios documentation. There are quite a few configurations you may need to do still even with debian packages. Do you happen to know if nagios-common and nagios-plugins came down as dependencies when you grabbed nagios-text?
 
Old 10-29-2005, 02:02 AM   #3
apenguinlinux
Member
 
Registered: Dec 2004
Distribution: debian
Posts: 91

Original Poster
Rep: Reputation: 15
yes .nagios-common and nagios-plugins is good ..
send me another solutions.
 
Old 10-30-2005, 12:01 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Re: nagios-installations,,,,

Quote:
Originally posted by apenguinlinux

Oct 28 16:14:44 debian nagios: Error: Cannot open main configuration file '/root/-' for reading!
Did you create the Nagios config file? It looks like it's trying to use /root/- as its config file which is almost certainly incorrect. You might check the startup script to see if it's giving it the correct location of the configuration file, which is in /etc/nagios. Try running it directly from the command line, which seemed to work your first time. it would also help if you posted the exact command you're using to invoke nagios that is generating the errors in the syslog.
 
Old 11-10-2005, 02:45 PM   #5
anickless
LQ Newbie
 
Registered: Nov 2005
Location: Edmonton
Distribution: Debian sarge & woody
Posts: 29

Rep: Reputation: 15
nagio installation

I have sucessfully installed nagios if you wish i can send you my walkthrough, let me know.
 
Old 12-21-2005, 10:34 AM   #6
Setsquare
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by anickless
I have sucessfully installed nagios if you wish i can send you my walkthrough, let me know.
I would like to see the walkthrough could you post it here please.
 
Old 12-21-2005, 10:44 AM   #7
anickless
LQ Newbie
 
Registered: Nov 2005
Location: Edmonton
Distribution: Debian sarge & woody
Posts: 29

Rep: Reputation: 15
1.1Installing MRTG in Debian
Install mrtg by typing ‘apt-get install mrtg’ and install apache by typing ‘apt-get install apache or apache2’ which ever you prefer.
Create a directory to store the configuration files in /etc called mrtg.d.
Change directory to mrtg.d and run cfgmaker with the snmp community name and the address of what you want to monitor piped to a config file of that devices name: e.g. cfgmaker public@192.168.1.2 > switch.cfg
You will have to modify the .cfg file you made for what we will be doing in apache. Vi your .cfg file and in the uncommented working dir make sure for debian it is “/var/www/mrtg/switch do not append the .cfg suffix as you will be making a directory called “switch”.
Change to “/var/www” and make a directory called mrtg and in that make a directory called “switch”. As a note this is where all the directories for every device that you wish to monitor will be.
Inside of the switch directory you created run mrtg three times to collect data and clear the warnings. The command would be “/usr/bin/mrtg /etc/mrtg.d/switch.cfg”. It doesn’t matter where you type this because we gave absolute paths but it is the most convenient.
Run indexmaker with arguments as “ /etc/mrtg.d/switch.cfg > index.html. What we are doing is for each device you are monitoring it has its own folder and inside that folder it has it’s own index page so in the server you would be looking for http://www.yourwebsite.com/mrtg/switch/index.html
Now all that is left for the web server is to make a default index.html with links to the devices.
Last step is to check out your cron because you want the info on the website to update every so often right? Well in debian you go to /etc/cron.d. If there is an mrtg entry you just vi that and copy the default entry and where every you see a mrtg.cfg or mrtg.log change it to the your switch or device your monitoring. In our case I would change it to switch.cfg and switch.log
There you go have fun with it 
 
Old 12-21-2005, 11:25 AM   #8
Setsquare
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Rep: Reputation: 0
Is this for MRTG or Nagios ?
 
Old 12-21-2005, 11:33 AM   #9
anickless
LQ Newbie
 
Registered: Nov 2005
Location: Edmonton
Distribution: Debian sarge & woody
Posts: 29

Rep: Reputation: 15
opps wrong one sry
 
Old 12-21-2005, 01:20 PM   #10
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
Configuring Nagios was quiet a hectic task for me but finally was able to do it. I to got a similar error at the very begining. Configuration file in /tmp/a not found. But later after all the configuration have been done it never gave the error. apenguinlinux, could you post your nagios.log? I think that you have not made the database connectivity, for which you are getting the error. The debian installer for nagios comes with database support. You just have to change the cgi.cfg, resource.cfg and the nagios.cfg file. Try doing that and I think that you will succeed.

--
Prasanta

Last edited by prasanta; 12-21-2005 at 01:23 PM.
 
Old 12-22-2005, 01:03 AM   #11
apenguinlinux
Member
 
Registered: Dec 2004
Distribution: debian
Posts: 91

Original Poster
Rep: Reputation: 15
hi friends .

i have install it successfully
thanks
 
Old 02-24-2006, 01:17 PM   #12
jwjody
Member
 
Registered: Sep 2003
Posts: 37

Rep: Reputation: 15
Could someone post their walkthrough on getting nagios set up with debian?

I did the apt-get install nagios-mysql. Was that the wrong one? Should I do the nagios-text?

Thanks,
J
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios? suresheva31 Linux - General 2 10-13-2004 07:55 AM
About NAGIOS Redhat_guy Linux - Networking 3 06-30-2004 01:43 PM
About NAGIOS .. Redhat_guy Linux - Software 2 06-30-2004 08:13 AM
Nagios VincentB Linux - Software 3 09-09-2003 09:20 AM
Nagios markus1982 Linux - Software 1 04-01-2003 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration