Permalink
Commits on Mar 8, 2012
  1. notifications.c: fix HOSTACKAUTHOR/ALIAS macros not populated on host…

    … notification
    
    although those macros are marked deprecated, their
    behaviour is wrong and therefore fixed with this patch.
    
    Conflicts:
    
    	base/notifications.c
    Michael Friedrich committed Mar 8, 2012
  2. reduce notification load; fix $NOTIFICATIONRECIPIENTS$ macro #98

    1) currently, the list of contacts to be notified is created
    and finally on the notification actually happening, the
    viability checks happen. this will cause heavy load on systems
    with many contacts configured, looping even for the contacts
    who won't pass the notification viability tests.
    in order to solve that, a patch by Opsview Team was taken into
    account, moving the viability checks directly into the notification
    list creation before adding a contact to the list.
    
    note: the check against the timeperiod will happen on list creation,
    not an actual notification being sent. but that's a minor flaw.
    
    2) while moving the viability checks on list creation, this will
    cause that not *all* contacts of the host/service will be added to
    the list, but just those actually receiving the notification. the
    macro $NOTIFICATIONSRECEIPIENTS$ gets populated in add_notification()
    and will therefore hold only those contacts being viable for a
    notification.
    
    note: this fixes #98 on the bug tracker.
    
    for further analysis and tests, please refer over here
    https://dev.icinga.org/issues/1744
    https://dev.icinga.org/issues/2023
    
    kudos to Opsview Team for their initial patch, this has been
    reworked into current macro threadsafety logic with some proper
    inline comments.
    
    Conflicts:
    
    	include/nagios.h
    Michael Friedrich committed Mar 8, 2012
Commits on Aug 31, 2011
  1. core: plug memory leak in xodtemplate.c - free display_name correctly

    $ sudo valgrind --leak-check=full --log-file=valgrind.log base/icinga /etc/nagios/icinga.cfg
    Michael Friedrich committed Aug 31, 2011
  2. core: fix content of macro $NOTIFICATIONRECIPIENTS$ grows and grows #…

    …1695
    
    the macro itsself is never free'd and it's one of those using realloc
    and strcat to grow in size. after having sent all notifications, this
    macro needs to be free'd. it isn't exactly a memory leak but an
    unwanted yet buggy behaviour.
    
    see https://dev.icinga.org
    
    fixes #1695
    Michael Friedrich committed Aug 31, 2011
Commits on Aug 4, 2011
  1. fix html/Makefile.in - kudos Craig Genner

    Michael Friedrich committed Aug 4, 2011
  2. re-allow empty perfdata updates AND macro calculation in 3.3.1

    Michael Friedrich committed Aug 4, 2011
Commits on Jul 26, 2011
  1. Prep for 3.3.1 release

    Ethan Galstad committed Jul 26, 2011
  2. Added ability to authenticate to CGIs using contactgroup name (Stephe…

    …n Gran)
    Ethan Galstad committed Jul 26, 2011
  3. Reworked indent

    Ethan Galstad committed Jul 26, 2011
  4. Fixed bug where unauthorized contacts could issue hostgroup and servi…

    …cegroup commands (Sven Nierlein)
    Ethan Galstad committed Jul 26, 2011
  5. Style consistency - conformity!

    Ethan Galstad committed Jul 26, 2011
Commits on Jul 25, 2011
  1. Style updates to match existing style more closely

    Ethan Galstad committed Jul 25, 2011
Commits on Jul 24, 2011
  1. Main splash screen mods, classic and exfolation stylesheet mods/synch…

    …ronization
    Ethan Galstad committed Jul 24, 2011
Commits on Jul 23, 2011
  1. Resized logo, minor mods to splash screen

    Ethan Galstad committed Jul 23, 2011
  2. Updated copyright notice

    Ethan Galstad committed Jul 23, 2011
  3. Fixes for installing html (docs no longer included)

    Ethan Galstad committed Jul 23, 2011
Commits on Jun 13, 2011
  1. core: Avoid sending notifications to the wrong contact

    When a nebmodule blocks a notification, notification_list wasn't
    cleared, causing the next notification to go out to all contacts for the
    blocked notification, as well as to all contacts for the current
    notification.
    
    Fix by remember to clear notification_list after a nebmodule returns,
    and by always clearing notification_list prior to filling it up again to
    avoid similar bugs in the future. It's not dangerous to call too often,
    and it's very cheap when notification_list is NULL.
    
    Patch-by: Robin Sonefors <robin.sonefors@op5.com>
    Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed Jun 13, 2011
  2. core: Avoid using global macros when sending notifications

    It makes no sense to have a single spot apart from initialization
    where the global macro struct is used. It doesn't even make much
    sense there, but at least we can get rid of as much as possible
    of the global madness.
    
    This might fix the problem of unassigned contacts receiving
    notifications, but requires rigorous testing.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed Jun 13, 2011
  3. core: Try to avoid a single check being reaped multiple times

    Previously, a check that happened to time out at the same time
    as it was completing could lead to the checkresult output file
    being either written to after it's been closed, or closed more
    than once.
    
    This patch should close the window where it's possible for that
    to happen, thus preventing coredumps from occurring with the
    distressing frequency at least one of our customers has seen.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed Jun 13, 2011
  4. core: Make command_check_interval=-1 equal command_check_interval=5s

    The docs claim that "-1" is supposed to mean "check as often as
    possible", but the code begs to differ and uses a command check
    interval of 60 seconds in such cases. I have no idea why, but it
    appears the super-unlikely has happened and the docs got updated
    but not the code instead of the other way around.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed Jun 13, 2011
Commits on May 31, 2011
  1. Add indent.sh and make 'make indent' a wrapper for running it

    Otherwise users have to run ./configure to be able to indent the
    sources. That's perhaps not such a bad idea anyway, but this is
    slightly more convenient in case there are unofficial lieutenants
    that ship patches upstream from their own contributors.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 31, 2011
  2. Add a make-target to indent all sources

    Using astyle + find, this implements the style discussed in the
    thread at http://comments.gmane.org/gmane.network.nagios.devel/7683
    which is sort of what we agreed on at the first (very informal)
    Nagios core dev conference in Sweden in 2008.
    
    "make indent" or "make pretty" should enforce the rules to all
    sources located in the checked out tree. It's probably wise to
    run it after applying a patch and recommend patch submitters to
    run it before creating their patches. The fact that it's a
    readily available make target makes it quite simple to add janitor
    commits, re-fixing any broken indentation every once in a while
    though.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 31, 2011
  3. Changelog: Remove merge conflict marker

    grrmbll...
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 31, 2011
Commits on May 30, 2011
  1. Fix flexible downtime on service hard state change

    recently, there was a change on flexible downtime triggering,
    allowing soft state changes to active a flexible downtime.
    
    this change removed the condition on hard_state_change check,
    so it only triggered those from soft state changes but not
    the well known older behavior.
    
    the tricky part is, that those 2 vars are not the same on each
    state change, so the replacement fix needs a sanitized "near-by"
    addin, which this patch introduces.
    
    this bug has been evaluated and debugged in deep, the fix
    now runs >2 months on productive systems, allowing us to
    trigger flexible downtimes on hard state changes too, next
    to the soft state changes being detected.
    
    A deeper analysis exists at https://dev.icinga.org/issues/1228
    
    Signed-off-by: Michael Friedrich <michael.friedrich@univie.ac.at>
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 30, 2011
  2. Restore ABI compatibility for macro functions

    The current source makes the macro logic thread safe.
    within common/macros.c several function prototypes have
    been changed and new nagios_macros* mac argument is
    required. if a (neb) module uses such internal functions
    and expected the old version, the empty macro object will
    cause the core to run into SIGSEGV.
    
    The proposed solution for backwards compatibility is to
    rename the changed thread safe functions from *_macro()
    to *_macro_r() and add the previous function prototypes
    again. those make an internal call to macro_r() passing
    &global_macros as an argument.
    the core and cgi references have been replaced to use the
    internal thread safe implementation.
    
    This has been implemented and tested with mod_gearman and
    mklivestatus, *do and merlin currently don't use the macro
    logic in their respective neb module.
    
    After a future release of Nagios, the default functions might
    get deprecated and only the *_macro_r() announced as mandatory.
    
    Signed-off-by: Michael Friedrich <michael.friedrich@univie.ac.at>
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 30, 2011
  3. Fix race on flexible downtime with invalid duration

    it may happen that an external command sets a
    flexible downtime with duration not set or zero.
    
    a flexible downtime is triggered between start and
    end time and needs a duration to be set and non zero.
    
    without the fix, the scheduled downtime starts and then
    tries to calculate the end time out of the set duration
    for the downtime and scheduling a new event.
    the time passed over there is in the past, and causes the
    core to get into a loop.
    
    to prevent this misbehavior, a duration of null or zero is
    not allowed and triggered as error in base/commands.c not
    setting any flexible downtime.
    
    Signed-off-by: Michael Friedrich <michael.friedrich@univie.ac.at>
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    ageric committed May 30, 2011
Commits on May 13, 2011
Commits on May 11, 2011
  1. Fix compile warnings

    tonvoon committed May 11, 2011
  2. Fixed problem where acknowledgements were getting reset when a hard s…

    …tate change occurred
    tonvoon committed May 11, 2011
  3. Removed generate test file

    tonvoon committed May 11, 2011