-
Notifications
You must be signed in to change notification settings - Fork 33
Event Logging
- Better align marketed terms within logging.
- Provide riak-repl command audit logging for customers and use in troubleshooting.
- Provide human readable, actionable error messages that will be accompanied by documentation outlining causes and actions to be taken by customer.
- Reduce confusion and decrease difficulty associated with interpreting logs.
- Event codes ex. MDC-002401.
- The application is encoded with the alphanumeric characters prior to the dash. The first 3 digits following the dash will encode the file, with the last 3 digits encoding the event. This will be transparent to the customer, other than their ability to extrapolate that MDC represents Multi Data Center, CORE would represent Riak Core etc. This will allow event codes to simply be incremented in files without knowledge of event codes existing outside the current file.
The below logging events are triggered only when riak-repl commands that make changes to the cluster are executed. Commands that retrieve information are not recorded.
riak_repl_console.erl Module Code: 001
| Command | Function | Message |
|---|---|---|
| Add Listener | add_listener_internal | MDC-001201 COMMAND RUN: Add Listener NodeName on IP:Port. |
| Delete Listener | del_listener | MDC-001202 COMMAND RUN: Delete Listener NodeName on IP:Port. |
| Add Site | add_site | MDC-001203 COMMAND RUN: Add Site SiteName for IP:Port. |
| Delete Site | del_site | MDC-001204 COMMAND RUN: Delete Site SiteName. |
| Add NAT Listener | add_nat_listener_internal | MDC-001205 COMMAND RUN: Add NAT Listener NodeName on IP:Port using Public address PublicIP:PublicPort. |
| Start Fullsync | start_fullsync | MDC-001206 COMMAND RUN: Start Fullsync to all sites. |
| Cancel Fullsync | cancel_fullsync | MDC-001207 COMMAND RUN: Cancel Fullsync to all sites. |
| Pause Fullsync | pause_fullsync | MDC-001208 COMMAND RUN: Pause Fullsync to all sites. |
| Resume Fullsync | resume_fullsync | MDC-001209 COMMAND RUN: Resume Fullsync to all sites. |
| Command | Function | Message |
|---|---|---|
| Set Replication Modes | set_modes | MDC-001301 COMMAND RUN: Set replication mode(s) to Modes. |
| Set Clustername | clustername | MDC-001302 COMMAND RUN: Set cluster name to ClusterName. |
| Connect to Cluster | connect | MDC-001303 COMMAND RUN: Connect to cluster at IP:Port. |
| Disconnect from Cluster | disconnect | MDC-001304 COMMAND RUN: Disconnect from cluster at IP:Port. |
| Disconnect from Cluster | disconnect | MDC-001305 COMMAND RUN: Disconnect from cluster Remote. |
| Enable Realtime | realtime | MDC-001306 COMMAND RUN: Enable Realtime Replication to cluster Remote. |
| Disable Realtime | realtime | MDC-001307 COMMAND RUN: Disable Realtime Replication to cluster Remote. |
| Start Realtime | realtime | MDC-001308 COMMAND RUN: Start Realtime Replication to cluster Remote. |
| Start Realtime | realtime | MDC-001309 COMMAND RUN: Start Realtime Replication to all connected clusters. |
| Stop Realtime | realtime | MDC-001310 COMMAND RUN: Stop Realtime Replication to cluster Remote. |
| Stop Realtime | realtime | MDC-001311 COMMAND RUN: Stop Realtime Replication to all connected clusters. |
| Enable Fullsync | fullsync | MDC-001312 COMMAND RUN: Enable Fullsync Replication to cluster Remote. |
| Disable Fullsync | fullsync | MDC-001313 COMMAND RUN: Disable Fullsync Replication to cluster Remote. |
| Start Fullsync | fullsync | MDC-001314 COMMAND RUN: Start Fullsync Replication to cluster Remote. |
| Start Fullsync | fullsync | MDC-001315 COMMAND RUN: Start Fullsync Replication to all connected clusters. |
| Stop Fullsync | fullsync | MDC-001316 COMMAND RUN: Stop Fullsync Replication to cluster Remote. |
| Stop Fullsync | fullsync | MDC-001317 COMMAND RUN: Stop Fullsync Replication to all connected clusters. |
| Set Realtime Cascades to Always | realtime_cascades | MDC-001318 COMMAND RUN: Enable Realtime Replication cascading. |
| Set Realtime Cascades to Never | realtime_cascades | MDC-001319 COMMAND RUN: Disable Realtime Replication cascading. |
| Add a NAT map | add_nat_map | MDC-001320 COMMAND RUN: Add a NAT map from External IP ExternalIP to Internal IP InternalIP. |
| Delete a NAT map | del_nat_map | MDC-001321 COMMAND RUN: Delete a NAT map from External IP ExternalIP to Internal IP InternalIP. |
| Enable Riak CS proxy GET | proxy_get | MDC-001322 COMMAND RUN: Enable Riak CS Proxy GET for Remote |
| Disable Riak CS proxy GET | proxy_get | MDC-001323 COMMAND RUN: Disable Riak CS Proxy GET for Remote |
| Set Fullsync Workers (node, source) | max_fssource_node | MDC-001324 COMMAND RUN: Set max number of Fullsync workers per Source node to NewVal. |
| Set Fullsync Workers (cluster, source) | max_fssource_cluster | MDC-001325 COMMAND RUN: Set max number of Fullsync workers for Source cluster to NewVal. |
| Set Fullsync Workers (node, sink) | max_fssink_node | MDC-001326 COMMAND RUN: Set max number of Fullsync works per Sink node to NewVal. |
riak_repl_ring.erl
Module Code: 002
| Event | Function | Message |
|---|---|---|
| Replication Modes Set | set_modes | MDC-002001 Replication Mode(s) set to NewModes. |
| Replication Modes Invalid | set_modes | MDC-002002 Replication Mode(s) specified (NewModes) are invalid. |
| Realtime Cascades Set | rt_cascades_trans | MDC-002003 Realtime replication cascading set to Val. |
| Riak CS Proxy GET enabled | pg_enable_trans | MDC-002004 Proxy GET enabled for Riak CS. |
| Riak CS Proxy GET disabled | pg_disable_trans | MDC-002005 Proxy GET disabled for Riak CS. |
| NAT Map Added | add_nat_map | MDC-002006 NAT Map added for {ExternalIP, InternalIP} - Mapping. |
| NAT Nap Deleted | del_nat_map | MDC-002007 NAT Map deleted for {ExternalIP, InternalIP} - Mapping. |
riak_core_cluster_mgr.erl
Module Code: 004
| Event | Function | Message |
|---|---|---|
| Cluster Connection Added | ensure_remote_connection | MDC-00401 Connection added for remote cluster Remote. |
riak_core_cluster_conn_sup.erl
Module Code: 005
| Event | Function | Message |
|---|---|---|
| Cluster Connection Removed | remove_remote_connection | MDC-005001 Connection removed for remote cluster Remote. |
riak_core_cluster_conn.erl
Module Code: 006
| Event | Function | Message |
|---|---|---|
| Cluster Connection Established | connected | MDC-006001 Connection established to remote cluster RemoteName. |
| Cluster Connection Failed | connect_failed | MDC-006002 Connection failed to remote cluster RemoteName. |
riak_core_connection.erl (riak_core)
| Event | Function | Message |
|---|---|---|
| Clustername Set | set_symbolic_clustername | MDC-% Cluster name set to ClusterName. |
riak_repl2_rt.erl
Module Code: 008
| Event | Function | Message |
|---|---|---|
| Realtime Replication Enabled | enable | MDC-008001 Realtime replication enabled for remote cluster Remote. |
| Realtime Replication Disabled | disable | MDC-008002 Realtime replication disabled for remote cluster Remote. |
| Realtime Replication Started | start | MDC-008003 Realtime replication started for remote cluster Remote. |
| Realtime Replication Stopped | stop | MDC-008004 Realtime replication stopped for remote cluster Remote. |
| Realtime Queue Overloaded | maybe_flip_overload | MDC-008005 Realtime replication queue overloaded. |
riak_repl2_rtsource_conn.erl
Module Code: 010
| Event | Function | Message |
|---|---|---|
| Realtime Source connection Success | handle_call(connected) | MDC-010001 Realtime replication connection established to Sink cluster Remote at peername(State2). |
| Realtime Source connection Failure | handle_call(connect_failed) | MDC-010002 Realtime replication connection failed to Sink cluster Remote. |
| TCP Connection Closed | handle_info(Closed) | MDC-010003 Realtime replication connection closed to Sink cluster Remote at peername(State). |
| TCP Connection Error | handle_info(Error) | MDC-010004 Realtime replication error in connection to Sink cluster Remote at peername(State). |
| Heartbeat Timeout | handle_info(heartbeat_timeout) | MDC-010005 Realtime replication heartbeat timeout to Sink cluster Remote at peername(State). |
| Error received from Sink | recv | MDC-010006 Realtime replication error received from Sink cluster Name at peername(State). |
riak_repl2_rtsink_conn.erl
Module Code: 012
| Event | Function | Message |
|---|---|---|
| TCP Connection Closed | handle_info(Closed) | MDC-012001 Realtime replication connection closed to Source cluster Remote at peername(State). |
| TCP Connection Error | handle_info(Error) | MDC-012002 Realtime replication error in connection to Source cluster Remote at peername(State). |
riak_repl2_fscoordinator_sup.erl
Module Code: 013
| Event | Function | Message |
|---|---|---|
| Fullsync Replication Enabled | start_coord | MDC-013001 Fullsync replication enabled for remote cluster Remote. |
| Fullsync Replication Disabled | stop_coord | MDC-013002 (?MODILE) Fullsync replication disabled for remote cluster Remote. |
riak_repl2_fscoordinator.erl
Module Code: 014
| Event | Function | Message |
|---|---|---|
| Fullsync Replication Started | handle_cast(start_fullsync) | MDC-014001 Fullsync replication started for remote cluster State#state.other_cluster. |
| Fullsync Replication Stopped | handle_cast(stop_fullsync) | MDC-014002 Fullsync replication stopped for remote cluster State#state.other_cluster. |
riak_repl2_fssource.erl
Module Code: 016
| Event | Function | Message |
|---|---|---|
| Fullsync Connected for Partition | handle_call(connected) | MDC-016001 Fullsync replication for Partition: Partition connected to Sink cluster State#state.cluster at IP. |
| Fullsync Connection Failed for Partition | handle_cast(connect_failed) | MDC-016002 Fullsync replication connection FAILED to Sink cluster cluster for Partition: State#state.partition. |
| Fullsync Completed for Partition | handle_cast(fullsync_complete) | MDC-016003 Fullsync replication complete for Partition: State#state.partition. to Sink cluster Cluster. |
| TCP Connection Closed | handle_info(Closed) | MDC-016004 Fullsync replication connection CLOSED to Sink cluster State#state.cluster for Partition: State#state.partition. |
| TCP Connection Error | handle_info(Error) | MDC-016005 Fullsync replication connection ERROR to Sink cluster State#state.cluster for Partition: State#state.partition. |
riak_repl2_fssink.erl
Module Code: 018
| Event | Function | Message |
|---|---|---|
| TCP Connection Closed | handle_info(Closed) | MDC-018001 Fullsync replication connection CLOSED to Source cluster State#state.cluster. |
| TCP Connection Error | handle_info(Error) | MDC-018002 Fullsync replication connection ERROR to Source cluster State#state.cluster. |
Note: RemoteName not available in connected, connect_failed. Use ctrlClientProcess instead?