Discussion:
[Nagios-users] Nagios init script not working on Ubuntu 12.04
Abhinav Upadhyay
2013-06-10 09:02:40 UTC
Permalink
Hi,

I just followed the instructions on
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html to
install the latest stable release of Nagios (3.5) on a fresh Ubuntu
12.04 machine. Everything went fine, but when I try to start nagios
using /etc/init.d/nagios start, I get following error:

/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions

There is no file at /etc/rc.d/init.d/functions. It seems like the
Makefile could not put the functions file at /etc/rc.d/init.d ? Is it
a bug or I missed something?

Regards
Abhinav
Daniel Wittenberg
2013-06-12 19:29:56 UTC
Permalink
Functions is a file on rhel-based systems and provides common start/stop
routines. I dont use Ubuntu myself but if you figure out how to make it
work let me know. If I get some time I'll see if I still have an ubuntu
test VM to look at.

Dan
Post by Abhinav Upadhyay
Hi,
I just followed the instructions on
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html to
install the latest stable release of Nagios (3.5) on a fresh Ubuntu
12.04 machine. Everything went fine, but when I try to start nagios
/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions
There is no file at /etc/rc.d/init.d/functions. It seems like the
Makefile could not put the functions file at /etc/rc.d/init.d ? Is it
a bug or I missed something?
Regards
Abhinav
------------------------------------------------------------------------------
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Gavin Grieve [DATACOM]
2013-06-12 20:58:06 UTC
Permalink
You could try replacing the line that mentions functions with:
. /lib/lsb/init-functions

Note the full stop at the start is required.

I believe this is the Ubuntu equivalent.

--
Gavin Grieve

Systems Management Specialist | Datacom | Datacom House, 68 Jervois Quay, Wellington, 6011, New Zealand
www.datacom.co.nz<http://www.datacom.co.nz/> | PO Box 6376, Marion Square, Wellington, New Zealand 6141

From: Daniel Wittenberg [mailto:***@gmail.com]
Sent: Thursday, 13 June 2013 7:30 a.m.
To: Nagios Users List
Subject: Re: [Nagios-users] Nagios init script not working on Ubuntu 12.04


Functions is a file on rhel-based systems and provides common start/stop routines. I dont use Ubuntu myself but if you figure out how to make it work let me know. If I get some time I'll see if I still have an ubuntu test VM to look at.

Dan
On Jun 12, 2013 2:09 PM, "Abhinav Upadhyay" <***@gmail.com<mailto:***@gmail.com>> wrote:
Hi,

I just followed the instructions on
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html to
install the latest stable release of Nagios (3.5) on a fresh Ubuntu
12.04 machine. Everything went fine, but when I try to start nagios
using /etc/init.d/nagios start, I get following error:

/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions

There is no file at /etc/rc.d/init.d/functions. It seems like the
Makefile could not put the functions file at /etc/rc.d/init.d ? Is it
a bug or I missed something?

Regards
Abhinav

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-***@lists.sourceforge.net<mailto:Nagios-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Páll Guðjón Sigurðsson
2013-06-13 10:26:56 UTC
Permalink
Alternatively, do this to install nagios on ubuntu 12.04:


# apt-get install nagios3 nagios-plugins

The packages are quite good, and imho there is nothing quick about that quickstart guide.

Kind regards,
Pall Sigurdsson



----- Original Message -----
From: "Gavin Grieve [DATACOM]" <***@datacom.co.nz>
To: "Nagios Users List" <nagios-***@lists.sourceforge.net>
Sent: Wednesday, June 12, 2013 8:58:06 PM
Subject: Re: [Nagios-users] Nagios init script not working on Ubuntu 12.04





You could try replacing the line that mentions functions with:

. /lib/lsb/init-functions



Note the full stop at the start is required.



I believe this is the Ubuntu equivalent.
--
Gavin Grieve



Systems Management Specialist | Datacom | Datacom House, 68 Jervois Quay, Wellington, 6011, New Zealand

www.datacom.co.nz | PO Box 6376, Marion Square, Wellington, New Zealand 6141



From: Daniel Wittenberg [mailto:***@gmail.com]
Sent: Thursday, 13 June 2013 7:30 a.m.
To: Nagios Users List
Subject: Re: [Nagios-users] Nagios init script not working on Ubuntu 12.04



Functions is a file on rhel-based systems and provides common start/stop routines. I dont use Ubuntu myself but if you figure out how to make it work let me know. If I get some time I'll see if I still have an ubuntu test VM to look at.

Dan


On Jun 12, 2013 2:09 PM, "Abhinav Upadhyay" < ***@gmail.com > wrote:



Hi,

I just followed the instructions on
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html to
install the latest stable release of Nagios (3.5) on a fresh Ubuntu
12.04 machine. Everything went fine, but when I try to start nagios
using /etc/init.d/nagios start, I get following error:

/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions

There is no file at /etc/rc.d/init.d/functions. It seems like the
Makefile could not put the functions file at /etc/rc.d/init.d ? Is it
a bug or I missed something?

Regards
Abhinav

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Nivin Abraham
2013-09-17 08:15:07 UTC
Permalink
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16

i have installed my host os is windows 7
vm used is oracle virtualbox

i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH

i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type

"service nagios start"
and this is what i get

/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions




so pls help me and i am a newbie to linux as well as ubuntu
Eliezer Croitoru
2013-09-17 22:04:28 UTC
Permalink
Did you compiled nagios by yourself?

Eliezer
Post by Nivin Abraham
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7
vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
FTL Nagios
2013-09-18 07:56:25 UTC
Permalink
Start again and follow

http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html

Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.

Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly

Job done.

-----Original Message-----
From: Nivin Abraham [mailto:***@gmail.com]
Sent: 17 September 2013 09:15
To: nagios-***@lists.sourceforge.net
Subject: [Nagios-users] Nagios installation issue

my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16

i have installed my host os is windows 7 vm used is oracle virtualbox

i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH

i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type

"service nagios start"
and this is what i get

/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions




so pls help me and i am a newbie to linux as well as ubuntu


----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
Nagios-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null
Daniel Wittenberg
2013-09-18 13:19:48 UTC
Permalink
I don't use Ubuntu myself, does someone know if there is an equiv to
functions?

Dan
Post by FTL Nagios
Start again and follow
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html
Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.
Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly
Job done.
-----Original Message-----
Sent: 17 September 2013 09:15
Subject: [Nagios-users] Nagios installation issue
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7 vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Scott VR
2013-09-18 14:37:49 UTC
Permalink
The LSB way: /lib/lsb/init-functions
But I'm in agreement that an inexperienced user is better served using a
package for the particular distro.
Post by Daniel Wittenberg
I don't use Ubuntu myself, does someone know if there is an equiv to
functions?
Dan
Post by FTL Nagios
Start again and follow
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html
Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.
Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly
Job done.
-----Original Message-----
Sent: 17 September 2013 09:15
Subject: [Nagios-users] Nagios installation issue
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7 vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Daniel Wittenberg
2013-09-18 15:57:02 UTC
Permalink
Agreed, I figured if I could make the rpm do the right thing in each OS
that would be better. Within reason of course.

Dan
Post by Scott VR
The LSB way: /lib/lsb/init-functions
But I'm in agreement that an inexperienced user is better served using a
package for the particular distro.
Post by Daniel Wittenberg
I don't use Ubuntu myself, does someone know if there is an equiv to
functions?
Dan
Post by FTL Nagios
Start again and follow
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html
Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.
Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly
Job done.
-----Original Message-----
Sent: 17 September 2013 09:15
Subject: [Nagios-users] Nagios installation issue
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7 vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Sunil Sankar
2013-09-18 19:03:21 UTC
Permalink
In ubuntu the function file is /lib/lsb/init-functions change and let us
know if it works


Regards
Sunil


On Wed, Sep 18, 2013 at 9:27 PM, Daniel Wittenberg <
Post by Daniel Wittenberg
Agreed, I figured if I could make the rpm do the right thing in each OS
that would be better. Within reason of course.
Dan
Post by Scott VR
The LSB way: /lib/lsb/init-functions
But I'm in agreement that an inexperienced user is better served using a
package for the particular distro.
Post by Daniel Wittenberg
I don't use Ubuntu myself, does someone know if there is an equiv to
functions?
Dan
Post by FTL Nagios
Start again and follow
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html
Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.
Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly
Job done.
-----Original Message-----
Sent: 17 September 2013 09:15
Subject: [Nagios-users] Nagios installation issue
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7 vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
--
Regards
Sunil Sankar
Daniel Wittenberg
2013-09-19 03:47:30 UTC
Permalink
Unfortunately it looks like it would take quite a few changes from what I'm reading to get it to support both RHEL-based RPM's and LSB, so I'm almost inclined to say there should be a different init script for each unless someone wants to mangle the one to do both. I'm not a fan of requiring that LSB be loaded on EL systems so I don't really want to fully switch the spec file over. I don't think I have enough time right now to convert the script over and do all the testing (especially since I don't have a box setup for it), but if someone wants to write one and send it to me I can work on integrating it with the RPM/build.

Dan
In ubuntu the function file is /lib/lsb/init-functions change and let us know if it works
Regards
Sunil
Agreed, I figured if I could make the rpm do the right thing in each OS that would be better. Within reason of course.
Dan
The LSB way: /lib/lsb/init-functions
But I'm in agreement that an inexperienced user is better served using a package for the particular distro.
I don't use Ubuntu myself, does someone know if there is an equiv to functions?
Dan
Start again and follow
http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html
Change the version numbers to whatever version you are installing obviously
as to whats wrote in that guide as its quite old.
Also you need to install "apt-get libssl-dev" before you install the plugins
or the 1.4.16 plugins will fail to install properly
Job done.
-----Original Message-----
Sent: 17 September 2013 09:15
Subject: [Nagios-users] Nagios installation issue
my ubuntu version is 12.04
nagios version is nagios-4.0.0beta4
nagios plugin version is nagios-plugins-1.4.16
i have installed my host os is windows 7 vm used is oracle virtualbox
i followed the installation from youtube video Nagios sous Ubuntu 12.04 ~
Mohamed AKRICH
i followed the entire installation but changed the versions as mentioned
above everything got installed without any issues but when i type
"service nagios start"
and this is what i get
/etc/init.d/nagios: 20 .:Can't open /etc/rc.d/init.d/functions
so pls help me and i am a newbie to linux as well as ubuntu
----------------------------------------------------------------------------
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends
9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
--
Regards
Sunil Sankar
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Markus
2013-09-18 20:03:11 UTC
Permalink
Hi Abhinav,

I found my "old" Nagios 3 init script ist working well with Nagios 4 under
Debian wheezy:

#!/bin/sh
#
# chkconfig: 345 99 01
# description: Nagios network monitor
#
# File : nagios
#
# Author : Jorge Sanchez Aymar (***@lanchile.cl)
#
# Changelog :
#
# 1999-07-09 Karl DeBisschop <***@infoplease.com>
# - setup for autoconf
# - add reload function
# 1999-08-06 Ethan Galstad <***@nagios.org>
# - Added configuration info for use with RedHat's chkconfig tool
# per Fran Boon's suggestion
# 1999-08-13 Jim Popovitch <***@rocketship.com>
# - added variable for nagios/var directory
# - cd into nagios/var directory before creating tmp files on startup
# 1999-08-16 Ethan Galstad <***@nagios.org>
# - Added test for rc.d directory as suggested by Karl DeBisschop
# 2000-07-23 Karl DeBisschop <***@users.sourceforge.net>
# - Clean out redhat macros and other dependencies
# 2003-01-11 Ethan Galstad <***@nagios.org>
# - Updated su syntax (Gary Miller)
#
# Description: Starts and stops the Nagios monitor
# used to provide network services status.
#

status_nagios ()
{

if test -x $NagiosCGI/daemonchk.cgi; then
if $NagiosCGI/daemonchk.cgi -l $NagiosRunFile; then
return 0
else
return 1
fi
else
if ps -p $NagiosPID > /dev/null 2>&1; then
return 0
else
return 1
fi
fi

return 1
}


printstatus_nagios()
{

if status_nagios $1 $2; then
echo "nagios (pid $NagiosPID) is running..."
else
echo "nagios is not running"
fi
}


killproc_nagios ()
{

kill $2 $NagiosPID

}


pid_nagios ()
{

if test ! -f $NagiosRunFile; then
echo "No lock file found in $NagiosRunFile"
exit 1
fi

NagiosPID=`head -n 1 $NagiosRunFile`
}


# Source function library
# Solaris doesn't have an rc.d directory, so do a test first
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi

prefix=/usr/local/nagios
exec_prefix=${prefix}
NagiosBin=${exec_prefix}/bin/nagios
NagiosCfgFile=${prefix}/etc/nagios.cfg
NagiosStatusFile=${prefix}/var/status.dat
NagiosRetentionFile=${prefix}/var/retention.dat
NagiosCommandFile=${prefix}/var/rw/nagios.cmd
NagiosVarDir=${prefix}/var
NagiosRunFile=${prefix}/var/nagios.lock
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=${exec_prefix}/sbin
NagiosUser=nagios
NagiosGroup=nagios


# Check that nagios exists.
if [ ! -f $NagiosBin ]; then
echo "Executable file $NagiosBin not found. Exiting."
exit 1
fi

# Check that nagios.cfg exists.
if [ ! -f $NagiosCfgFile ]; then
echo "Configuration file $NagiosCfgFile not found. Exiting."
exit 1
fi

# See how we were called.
case "$1" in

start)
echo -n "Starting nagios:"
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
su - $NagiosUser -c "touch $NagiosVarDir/nagios.log
$NagiosRetentionFile"
rm -f $NagiosCommandFile
touch $NagiosRunFile
chown $NagiosUser:$NagiosGroup $NagiosRunFile
$NagiosBin -d $NagiosCfgFile
if [ -d $NagiosLockDir ]; then touch
$NagiosLockDir/$NagiosLockFile; fi
echo " done."
exit 0
else
echo "CONFIG ERROR! Start aborted. Check your
Nagios configuration."
exit 1
fi
;;

stop)
echo -n "Stopping nagios: "

pid_nagios
killproc_nagios nagios

# now we have to wait for nagios to exit and remove its
# own NagiosRunFile, otherwise a following "start" could
# happen, and then the exiting nagios will remove the
# new NagiosRunFile, allowing multiple nagios daemons
# to (sooner or later) run - John Sellens
#echo -n 'Waiting for nagios to exit .'
for i in 1 2 3 4 5 6 7 8 9 10 ; do
if status_nagios > /dev/null; then
echo -n '.'
sleep 1
else
break
fi
done
if status_nagios > /dev/null; then
echo ''
echo 'Warning - nagios did not exit in a timely manner'
else
echo 'done.'
fi

rm -f $NagiosStatusFile $NagiosRunFile
$NagiosLockDir/$NagiosLockFile $NagiosCommandFile
;;

status)
pid_nagios
printstatus_nagios nagios
;;

checkconfig)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo " OK."
else
echo " CONFIG ERROR! Check your Nagios
configuration."
exit 1
fi
;;

restart)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done."
$0 stop
$0 start
else
echo " CONFIG ERROR! Restart aborted. Check your
Nagios configuration."
exit 1
fi
;;

reload|force-reload)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done."
if test ! -f $NagiosRunFile; then
$0 start
else
pid_nagios
if status_nagios > /dev/null; then
printf "Reloading nagios
configuration..."
killproc_nagios nagios -HUP
echo "done"
else
$0 stop
$0 start
fi
fi
else
echo " CONFIG ERROR! Reload aborted. Check your
Nagios configuration."
exit 1
fi
;;

*)
echo "Usage: nagios {start|stop|restart|reload|force-
reload|status|checkconfig}"
exit 1
;;

esac

# End of this script

Loading...