sql/oracle: Spelling of comment_tbl_id_SEQ

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
spec: Add build dep on nagios-devel

Without it, there will be no headers and the build will fail.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
sltest.c: Fix libnagios include file path

They were moved fairly recently, but this reference wasn't updated.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
spec: Add correct nagios include path for our systems

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Makefile: Disable nebtest

It doesn't work as gcc won't statically include the symbols from
libnagios when they aren't used in the nebtest, and the module assumes
that the parent process has the library included.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
oracle: mv {,merlin_}grant.sql

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
oracle: Rename SQL files so that we can find them easier later on

It's either this, or checking them out, renaming the copies and try to
find your way back home when backtracking. Good luck with that.

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
Stop transmitting and db-updating immutable variables

initial_state, freshness_threshold and {low,high}_flap_threshold
can never change once they're inserted initially, so we can get
away with a bit less work by not inserting them into the database
all the time, and avoiding assigning them when we're sending and
receiving host and service status and check events.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Restore Merlin 1.x database compatibilities

There's no real reason to break backwards compatibility for
UI's when it's quite easy to keep maintaining them. With this
patch we restore compatibility, making Ninja 2.0.x and other
existing users of the merlin database keep working.

Signed-off-by: Andreas Ericsson <ae@op5.se>
oracle: Syntax error on DROP INDEX

The schema is, contrary to MySQL, left out. This is the error received:

ORA-00933: SQL command not properly ended

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
oracle: Remove duplicate definition of rename_log

It's not present in the already delivered 5.4.2.6-Solaris release, so
we'll keep the definitions already given in merlin-v5.4_to_v5.5.sql.

Signed-off-by: Carl Helmertz <chelmertz@op5.com>
daemon: Make insertion of current status into database optional

The default is right now that this is off, since I'm lazy and want
to test this on a wide range of servers without having to actually
configure it on all of them.

Signed-off-by: Andreas Ericsson <ae@op5.se>
example.conf: Remove mentioning of "cancel_threads"

Since we're no longer multi-threaded we don't really need it.

Reported-by: Mark Frost <mark.frost1@pepsico.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
daemon: Make log_notifications = 0 actually have impact

Although I do believe we're not shipping any notification events
other than contact_notification_method, we may as well be thorough
and make sure that we handle them properly if we do.

Signed-off-by: Andreas Ericsson <ae@op5.se>
daemon: Make it easier to disable the database temporarily

This patch makes it a lot easier to disable the database completely
by setting 'enabled = no' in the database section of the daemon's
configuration compound, thus removing the need to comment out the
entire database section just to test merlin with database disabled.

Signed-off-by: Andreas Ericsson <ae@op5.se>
example.conf: Update with new (and not-so-new) variables

By default we want to log report data and notifications, but not
track current status.

Signed-off-by: Andreas Ericsson <ae@op5.se>
db_updater: Fix segfault in handle_service_status()

We must NULL-initialize the sql_quote() output holders, or we
risk getting double free or memory corruption of some other kind.

Signed-off-by: Andreas Ericsson <ae@op5.se>
db_updater: Fix (another) segfault in handle_service_status

safe_free() isn't so safe when used twice on the same variable...

Signed-off-by: Andreas Ericsson <ae@op5.se>
spec: Use our nagios package name

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
sshkey.{fetch,push}: Exchange keys for both root and monitor

That is, all
 * monitor users can ssh to all monitor users
 * root users can ssh to all root users
 * root users can ssh to all monitor users
but monitor users can NOT ssh to root users.

This fixes bug #5310.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>