Skip to content

Commit

Permalink
Merge pull request #24 from linux-ha-japan/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
yuusuke committed Aug 18, 2015
2 parents 8f65590 + 4edfbea commit 78ae790
Show file tree
Hide file tree
Showing 6 changed files with 497 additions and 587 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
logconv_NAME = pm_logconv
logconv_SCRIPTS = $(logconv_NAME).py
logconv_CONFIG = $(logconv_NAME).conf.sample
logconv_DATA = $(logconv_NAME)_rules.conf

MAINTAINERCLEANFILES = Makefile.in
logconvdir = @HA_NOARCHDATAHBDIR@/$(logconv_NAME)
Expand All @@ -11,7 +12,7 @@ SUBDIRS = init
SHAREDIR = $(logconvdir)
SPEC = $(logconv_NAME).spec
TARFILE = $(PACKAGE_NAME)-$(VERSION).tar.gz
EXTRA_DIST = $(logconv_SCRIPTS) $(logconv_CONFIG) $(SPEC) init
EXTRA_DIST = $(logconv_SCRIPTS) $(logconv_CONFIG) $(logconv_DATA) $(SPEC) init

install-data-hook:
@$(NORMAL_INSTALL)
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.59])
AC_INIT([pm_logconv-cs], [2.0])
AC_INIT([pm_logconv-cs], [2.1])
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT(/usr)
PM_PKG="pacemaker"
Expand Down
303 changes: 2 additions & 301 deletions pm_logconv.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,311 +5,12 @@
[Settings]
#ha_log_path = /var/log/ha-log
#output_path = /var/log/pm_logconv.out
#output_logfacility = local2
#syslogformat = True
#reset_interval = 60
#attribute_ping = not_defined default_ping_set or default_ping_set lt 100
#attribute_diskd = not_defined diskcheck_status or diskcheck_status eq ERROR
#attribute_diskd_inner = not_defined diskcheck_status_internal or diskcheck_status_internal eq ERROR
#logconv_logfacility = daemon
#logconv_logpriority = info
#act_rsc = prmExPostgreSQLDB, prmApPostgreSQLDB


###
# For Resource event.
###
#MsgNo.1-1, 2-1, 4-1, 5-1, 11-1, 12-1, 17-1, 18-1
[Resource tries to operation]
pattern=crmd,info:,do_lrm_rsc_op:,Performing,!_monitor_,!_notify_0
func=try_to_operate

#MsgNo.1-2, 2-2, 4-2, 5-2, 11-2, 12-2, 17-2, 18-2
[Resource operation succeeded]
pattern=crmd,notice:,process_lrm_event:,Operation,rc=0,!_monitor_,!_notify_0
func=operation_succeeded
loglevel=info

#MsgNo.1-3, 2-3, 3-1, 4-3, 5-3, 11-3, 12-3, 17-3, 19-1
[Resource operation failed]
pattern=crmd,!info:,process_lrm_event:,Operation,!rc=0,!rc=7,!rc=8,!_monitor_0,!_notify_0,!Timed Out
func=operation_failed
loglevel=error

#MsgNo.1-4, 2-4, 3-3, 4-4, 5-4, 11-4, 12-4, 17-4, 19-3
[OCF resource operation timedout]
pattern=crmd,error:,process_lrm_event:,Operation,!_monitor_0,!_notify_0,Timed Out
func=operation_timedout_ocf

#MsgNo.3-2
[Resource failure]
pattern=crmd,notice:,process_lrm_event:,Operation,_monitor_,!_monitor_0,rc=7
func=detect_rsc_failure
loglevel=error

###
# For Node status event.
##
#MsgNo.6-1, 6-2
[Node status updated]
pattern_lost=crmd,info:,peer_update_callback:,is now lost
pattern_member=crmd,info:,peer_update_callback:,is now member
func=node_status_updated

#MsgNo.6-3
[Node status determined]
pattern=pengine,determine_online_status:,Node,is
func=node_status_determined

###
# For Interconnect-LAN status event
# and Network status event (detected by ping).
###
#MsgNo.7-1
[Interconnect-LAN status dead]
pattern=corosync,,Marking seqid,ringid,interface,FAULTY
func=detect_iconnlan_dead
loglevel=warning

#MsgNo.7-2
[Interconnect-LAN status recover]
pattern=corosync,Automatically recovered ring
func=detect_iconnlan_recover

#MsgNo.8-1
[Network status dead]
pattern=ping,is inactive:
func=detect_node_dead
loglevel=error

###
# For Disk status event (detected by diskd).
###
#MsgNo.9-1
[Detect disk error]
pattern=diskd,warning:,check_status:,disk status is changed,new_status,ERROR
func=detect_disk_error
loglevel=error

###
# For respawn process event.
###
#MsgNo.10-1
[Respawn process starts]
pattern=info:,_child:,Forked child,for process
func=respawn_start

#MsgNo.10-2
[Respawn process exited abnormally]
pattern=pacemakerd,error:,pcmk_child_exit:,Child process,!OK
func=respawn_exited_abnormally
loglevel=warning

#MsgNo.10-3
[Respawn process killed]
pattern=pcmk_,Child process,terminated with signal
func=respawn_killed
loglevel=warning

#MsgNo.10-6
[Respawn process exited normally]
pattern=pacemakerd,info:,pcmk_child_exit:,Child process,OK
func=respawn_exited_normally

#MsgNo.10-7
[Respawning too fast in a short term]
pattern=error:,pcmk_,Child respawn count exceeded by
func=respawn_too_fast

###
# For Fail Over. These are only for DC node.
##
#MsgNo.F0-1, F9-1, F10-1
[Detect calculation starts]
pattern=crmd,do_state_transition:,State transition,S_IDLE -> S_POLICY_ENGINE,!I_SHUTDOWN
func=detect_pe_calc
loglevel=warning

#MsgNo.F0-2, F12-1, F12-2
[FailOver complete]
pattern_idle=crmd,do_state_transition:,State transition,-> S_IDLE
pattern_stopping=crmd,do_state_transition:,State transition,-> S_STOPPING
func=detect_fo_complete
loglevel=warning

#MsgNo.F1-1, F1-2, F2-1, F2-2, F3-1, F3-2, F4-1, F4-2, F6-1, F6-2
[Action failure]
pattern=crmd,warning:,update_failcount:,Updating failcount for
func=no_output_msg
fotrigger=1

#MsgNo.F7-1, F7-2
[Node failure]
pattern=corosync,A processor failed,forming new configuration.
func=no_output_msg
fotrigger=3

#MsgNo.F11-1
#The message is not output immediately, output when F/O is complete.
[Add Resource start action]
pattern=pengine,notice:,LogActions: Start
func=add_rsc_start

#MsgNo.F11-2
#The message is not output immediately, output when F/O is complete.
[Add Resource stop action]
pattern=pengine,notice:,LogActions: Stop
func=add_rsc_stop

#MsgNo.F11-3, F11-5, F11-8, F11-9, F11-11, F11-12
#The message is not output immediately, output when F/O is complete.
[Add no action]
pattern_leave=pengine,info:,LogActions: Leave
pattern_recover=pengine,notice:,LogActions: Recover,!->
pattern_restart=pengine,notice:,LogActions: Restart
pattern_reload=pengine,notice:,LogActions: Reload
func=add_no_action

#MsgNo.F11-6, F11-13 ,F11-14
#The message is not output immediately, output when F/O is complete.
[Add Resource move action]
pattern_move=pengine,notice:,LogActions: Move
pattern_recover=pengine,notice:,LogActions: Recover,->
pattern_migrate=pengine,notice:,LogActions: Migrate
func=add_rsc_move

#MsgNo.F11-10
#The message is not output immediately, output when F/O is complete.
[Resource initiating action]
pattern=crmd,notice:,te_rsc_command:,Initiating action,!probe_complete
func=rsc_init_action

###
# For DC election.
###
#MsgNo.13-2
[DC election is complete]
pattern=crmd,info:,update_dc:,Set DC to
func=dc_election_complete

#MsgNo.13-5
[Detect unset DC]
pattern=crmd,info:,update_dc:,Unset DC
func=detect_unset_dc

###
# For Pacemaker and Corosync service shutdown.
###
#MsgNo.14-1
[Corosync is shutting down.]
pattern=corosync,Unloading all Corosync service engines.
func=output_static_msg

#MsgNo.14-2
[Corosync shutdown complete.]
pattern=corosync,Corosync Cluster Engine exiting
func=detect_cs_shutdown

#MsgNo.14-3
[Pacemaker is shutting down.]
pattern=notice:,pcmk_shutdown,Shuting down
func=output_static_msg
loglevel=info

#MsgNo.14-4
[Pacemaker shutdown complete.]
pattern=notice:,pcmk_shutdown,Shutdown complete
func=output_static_msg
loglevel=info

#MsgNo.14-5 (only for DC)
[Corosync on the node in the cluster want to shutdown]
pattern=crmd,info:,handle_shutdown_request:,Creating shutdown request for
func=detect_shutdown_request

###
# For fence operation.
###
#MsgNo.21-1
[fence operation start]
pattern=crmd,notice:,te_fence_node:,Executing,fencing operation
func=fence_op_started
loglevel=info

#MsgNo.21-2
[fence operation succeeded]
pattern=crmd,notice:,tengine_stonith_notify:,was terminated,!by a human
func=fence_op_ended
loglevel=info

#MsgNo.21-3
[fence operation failed]
pattern=crmd,notice:,tengine_stonith_notify:,was not terminated
func=fence_op_ended
loglevel=error

#MsgNo.21-4
[fence too many failures]
pattern=crmd,notice:,too_many_st_failures:,Too many failures to fence
func=fence_too_many_failures
loglevel=error

#MsgNo.21-5
[executing stonith device start]
pattern=stonith,info:,call_remote_stonith:,Requesting that, perform op
func=exec_st_device_started

#MsgNo.21-6
[executing stonith device succeeded]
pattern=stonith,notice:,process_remote_stonith_exec:,Call to,on behalf of,OK
func=exec_st_device_ended
loglevel=info

#MsgNo.21-7
[executing stonith device failed]
pattern=stonith,notice:,process_remote_stonith_exec:,Call to,on behalf of,!OK
func=exec_st_device_ended
loglevel=warning

#MsgNo.21-8
[Manual stonith confirm]
pattern=crmd,notice:,tengine_stonith_notify:,was terminated,by a human
func=fence_op_ended
loglevel=info
fotrigger=3

###
# For attribute event.
###
#MsgNo.22-1
[Detect attribute updated]
pattern=attrd,info:,attrd_peer_update:,Setting,!-> \(null\),!fail-count-,!last-failure-,!probe_complete,!shutdown
func=detect_attr_updated
loglevel=info

#MsgNo.22-2
[Detect attribute deleted]
pattern=attrd,info:,attrd_peer_update:,Setting,-> \(null\),!fail-count-,!last-failure-,!probe_complete,!shutdown
func=detect_attr_deleted
loglevel=info

###
# For Corosync service starts.
###
#MsgNo.23-1
[Detect Corosync is starting]
pattern=corosync,Corosync Cluster Engine,started and ready to provide service
func=detect_cs_start

#MsgNo.23-4
[Detect Pacemaker is starting]
pattern=pacemakerd,notice:,main:,Starting Pacemaker
func=detect_pcmk_start
loglevel=info

###
# Ignore message.
###
#MsgNo.27-1
[Ignore message.]
pattern_info=info:
func=no_output_msg
ignoremsg=True
Loading

0 comments on commit 78ae790

Please sign in to comment.