Nagios logs format customization

Bug #1856299 reported by Lorenzo Cavassa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nagios Charm
Won't Fix
Wishlist
Unassigned

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
}

Tags: atos
Changed in nagios-charm:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Eric Chen (eric-chen) wrote :

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.