Building nagios-core under Solaris 10
Posted on November 3rd, 2010
When doing Solaris 10 build of nagios-core (latest at the time is 3.2.2) I’ve got the error:
"nagios.c", line 653: warning: implicit function declaration: asprintf ld: fatal: file ../common/snprintf.o: open failed: No such file or directory ld: fatal: File processing errors. No output written to nagios *** Error code 1 make: Fatal error: Command failed for target `nagios' Current working directory /soft/free/src/nagios-3.2.2/base *** Error code 1 make: Fatal error: Command failed for target `all'
The solution is to build these .o files manualy
$ cd common $ for file in `ls *.c`; do make `basename $file .c`.o; done $ cd .. $ make
And build process will continue.
Filed under Installation and Upgrade | No Comments »
Solaris 10 smf manifest for nagios server
Posted on September 14th, 2010
After installing nagios from source you may want to create a service manifest to fit in Solaris 10 system of services.
<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type="manifest" name="nagios"> <service name="site/nagios" type="service" version="1"> <create_default_instance enabled="true"/> <single_instance/> <dependency name="milestone" grouping="require_all" restart_on="none" type="service"> <service_fmri value="svc:/milestone/multi-user"/> </dependency> <exec_method type="method" name="start" exec="/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg" timeout_seconds="60"/> <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/> <stability value="Unstable"/> <template> <common_name> <loctext xml:lang="C"> nagios monitoring</loctext> </common_name> </template> </service> </service_bundle>
Create a file named nagios.xml and copy it to manifest directory, then enable the service.
cp nagios.xml /var/svc/manifest/site svccfg import /var/svc/manifest/site/nagios.xml svcadm enable nagios
Tags: Nagios, smf, Solaris
Filed under Installation and Upgrade | No Comments »
Upgrading nagios server installation without using packages
Posted on September 14th, 2010
Lets suppose you installed nagios server in the default /usr/local/nagios directory from source and time came to make an upgrade. I’ve tested the procedure with upgrade to nagios core 3.2.2 on Solaris 10 system.
# cd nagios-3.2.2 # ./configure --prefix=/usr/local/nagios --enable-embedded-perl # make install-html install-base install-cgis # cp p1.pl /usr/local/nagios/bin # svcadm disable nagios # svcadm enable nagios
Thats all.
Filed under Installation and Upgrade | No Comments »