← Back to team overview

nagios-charmers team mailing list archive

[Bug 1856299] Re: Nagios logs format customization

 

This charm is no longer being actively maintained. Please consider using the new Canonical Observability Stack instead.
(https://charmhub.io/topics/canonical-observability-stack)
I will close this feature request

** Changed in: charm-nagios
       Status: Triaged => Won't Fix

-- 
You received this bug notification because you are a member of Nagios
Charm developers, which is subscribed to Nagios Charm.
https://bugs.launchpad.net/bugs/1856299

Title:
  Nagios logs format customization

Status in Nagios Charm:
  Won't Fix

Bug description:
  We want to change style of logs generated by Nagios and make
  customization in it.

  Our idea to achieve it:
  1. Define new command example:

  define command{
  command_name notify-service-to-json
  command_line /bin/echo '{ "NotificationType" : "$NOTIFICATIONTYPE$", "Service" : "$SERVICEDESC$", "Host": "$HOSTALIAS$", "Address": "$HOSTADDRESS$", "State": "$SERVICESTATE$", "DateTime": "$LONGDATETIME$", "AdditionalInfo": "$SERVICEOUTPUT$ }' >> /var/log/nagios_json.log
  }

  
  2. Define new contact (eg. Admin_json) with ability to define service/host notification commands:

  
  define contact{
  contact_name admin_json
  alias Root
  service_notification_period 24x7
  host_notification_period 24x7
  service_notification_options w,u,c,r
  host_notification_options d,r
  service_notification_commands notify-host-by-json
  host_notification_commands notify-host-by-json
  email root@localhost
  }

  
  3. Ability to add newly created contact into contact group “admins”

  define contactgroup{
  contactgroup_name admins
  alias Nagios Administrators
  members root, admin_json
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-nagios/+bug/1856299/+subscriptions



References