You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/05/16 02:03:01 UTC

[trafficserver] branch master updated (554c828 -> 5400e5a)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 554c828  clang analzyer - fix false positive in Vol::handle_recover_from_data.
     new 5c672b1  Removes alarms that no longer are supported
     new fb3e59c  Removes the email feature of the Alarms subsystem
     new 5400e5a  Renumbers all the alarm codes / defines

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/python/compare_RecordsConfigcc.py          |  1 -
 doc/admin-guide/files/records.config.en.rst        | 16 ------
 doc/admin-guide/monitoring/alarms.en.rst           | 13 -----
 doc/developer-guide/api/types/TSMgmtTypes.en.rst   | 12 +---
 .../admin-guide/files/records.config.en.po         |  4 --
 .../admin-guide/monitoring/alarms.en.po            |  8 ---
 lib/perl/lib/Apache/TS/AdminClient.pm              |  2 -
 lib/records/I_RecAlarms.h                          | 26 +++------
 lib/records/I_RecSignals.h                         | 26 ++++-----
 mgmt/Alarms.cc                                     | 64 +++++-----------------
 mgmt/Alarms.h                                      | 39 +++----------
 mgmt/BaseManager.h                                 | 32 +++++------
 mgmt/LocalManager.cc                               | 32 -----------
 mgmt/RecordsConfig.cc                              |  4 --
 mgmt/api/CoreAPIShared.cc                          | 36 ------------
 mgmt/api/CoreAPIShared.h                           | 24 +++-----
 mgmt/api/include/mgmtapi.h                         |  9 ---
 src/traffic_manager/traffic_manager.cc             |  6 +-
 18 files changed, 68 insertions(+), 286 deletions(-)


[trafficserver] 01/03: Removes alarms that no longer are supported

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 5c672b1796d5eb5eef3197a697a1382f72454a1a
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu May 9 16:39:36 2019 -0600

    Removes alarms that no longer are supported
---
 doc/developer-guide/api/types/TSMgmtTypes.en.rst | 12 +----
 lib/records/I_RecAlarms.h                        | 16 +++----
 lib/records/I_RecSignals.h                       | 17 +++----
 mgmt/Alarms.cc                                   | 56 ++++++++----------------
 mgmt/Alarms.h                                    | 30 ++++---------
 mgmt/BaseManager.h                               | 14 +++---
 mgmt/LocalManager.cc                             | 32 --------------
 mgmt/api/CoreAPIShared.cc                        | 33 --------------
 mgmt/api/CoreAPIShared.h                         | 14 +++---
 mgmt/api/include/mgmtapi.h                       |  9 ----
 src/traffic_manager/traffic_manager.cc           |  6 +--
 11 files changed, 59 insertions(+), 180 deletions(-)

diff --git a/doc/developer-guide/api/types/TSMgmtTypes.en.rst b/doc/developer-guide/api/types/TSMgmtTypes.en.rst
index 6d53d22..435fe95 100644
--- a/doc/developer-guide/api/types/TSMgmtTypes.en.rst
+++ b/doc/developer-guide/api/types/TSMgmtTypes.en.rst
@@ -30,16 +30,10 @@ Management Signals
 
 .. c:macro:: MGMT_SIGNAL_PID
 
-.. c:macro:: MGMT_SIGNAL_MACHINE_UP
-
-.. c:macro:: MGMT_SIGNAL_MACHINE_DOWN
-
 .. c:macro:: MGMT_SIGNAL_CONFIG_ERROR
 
 .. c:macro:: MGMT_SIGNAL_SYSTEM_ERROR
 
-.. c:macro:: MGMT_SIGNAL_LOG_SPACE_CRISIS
-
 .. c:macro:: MGMT_SIGNAL_CONFIG_FILE_READ
 
 .. c:macro:: MGMT_SIGNAL_CACHE_ERROR
@@ -52,8 +46,6 @@ Management Signals
 
 .. c:macro:: MGMT_SIGNAL_PLUGIN_SET_CONFIG
 
-.. c:macro:: MGMT_SIGNAL_LOG_FILES_ROLLED
-
 .. c:macro:: MGMT_SIGNAL_LIBRECORDS
 
 .. c:macro:: MGMT_SIGNAL_HTTP_CONGESTED_SERVER
@@ -62,8 +54,6 @@ Management Signals
 
 .. c:macro:: MGMT_SIGNAL_CONFIG_FILE_CHILD
 
-.. c:macro:: MGMT_SIGNAL_SAC_SERVER_DOWN
-
 
 Management Events
 ==================
@@ -186,4 +176,4 @@ MgmtMarshallType
 
 .. c:macro:: MGMT_MARSHALL_STRING
 
-.. c:macro:: MGMT_MARSHALL_DATA
\ No newline at end of file
+.. c:macro:: MGMT_MARSHALL_DATA
diff --git a/lib/records/I_RecAlarms.h b/lib/records/I_RecAlarms.h
index 4cab2f5..a3dc5b8 100644
--- a/lib/records/I_RecAlarms.h
+++ b/lib/records/I_RecAlarms.h
@@ -24,22 +24,22 @@
 #pragma once
 
 // copy from mgmt/Alarms.h
+#define REC_ALARM_UNDEFINED 0
+
 #define REC_ALARM_PROXY_PROCESS_DIED 1
 #define REC_ALARM_PROXY_PROCESS_BORN 2
-#define REC_ALARM_PROXY_PEER_BORN 3
-#define REC_ALARM_PROXY_PEER_DIED 4
+// Currently unused: 3
+// Currently unused: 4
 #define REC_ALARM_PROXY_CONFIG_ERROR 5
 #define REC_ALARM_PROXY_SYSTEM_ERROR 6
-#define REC_ALARM_PROXY_LOG_SPACE_CRISIS 7
+// Currently unused: 7
 #define REC_ALARM_PROXY_CACHE_ERROR 8
 #define REC_ALARM_PROXY_CACHE_WARNING 9
 #define REC_ALARM_PROXY_LOGGING_ERROR 10
 #define REC_ALARM_PROXY_LOGGING_WARNING 11
 // Currently unused: 12
-#define REC_ALARM_REC_TEST 13
+// Currently unused: 13
 #define REC_ALARM_CONFIG_UPDATE_FAILED 14
-#define REC_ALARM_WEB_ERROR 15
-#define REC_ALARM_PING_FAILURE 16
+// Currently unused: 15
+// Currently unused: 16
 #define REC_ALARM_REC_CONFIG_ERROR 17
-#define REC_ALARM_ADD_ALARM 18
-#define REC_ALARM_PROXY_LOG_SPACE_ROLLED 19
diff --git a/lib/records/I_RecSignals.h b/lib/records/I_RecSignals.h
index 388c809..69d72bb 100644
--- a/lib/records/I_RecSignals.h
+++ b/lib/records/I_RecSignals.h
@@ -24,20 +24,21 @@
 #pragma once
 
 // copy from mgmt/BaseManager.h
+
 #define REC_SIGNAL_PID 0
-#define REC_SIGNAL_MACHINE_UP 1
-#define REC_SIGNAL_MACHINE_DOWN 2
+// Currently unused: 1
+// Currently unused: 2
 #define REC_SIGNAL_CONFIG_ERROR 3
 #define REC_SIGNAL_SYSTEM_ERROR 4
-#define REC_SIGNAL_LOG_SPACE_CRISIS 5
-#define REC_SIGNAL_CONFIG_FILE_READ 6
+// Currently unused: 5
+// Currently unused: 6
 #define REC_SIGNAL_CACHE_ERROR 7
 #define REC_SIGNAL_CACHE_WARNING 8
 #define REC_SIGNAL_LOGGING_ERROR 9
 #define REC_SIGNAL_LOGGING_WARNING 10
-// Currently unused: 11
-#define REC_SIGNAL_PLUGIN_CONFIG_REG 12
-#define REC_SIGNAL_PLUGIN_ADD_REC 13
+// Currently unused: 11 - 13
 #define REC_SIGNAL_PLUGIN_SET_CONFIG 14
-#define REC_SIGNAL_LOG_FILES_ROLLED 15
+// Currently unused: 15
 #define REC_SIGNAL_LIBRECORDS 16
+// Currently unused: 17 - 21
+#define REC_SIGNAL_CONFIG_FILE_CHILD 22
diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index d7a3171..a252274 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -31,25 +31,24 @@
 #include "records/P_RecCore.h"
 
 const char *alarmText[] = {
-  "Unknown Alarm",
-  "[TrafficManager] Traffic Server process was reset.",
-  "[TrafficManager] Traffic Server process established.",
-  "New Peer",
-  "Peer Died",
-  "Invalid Configuration",
-  "System Error",
-  "Log Space Crisis",
-  "Cache Error",
-  "Cache Warning",
-  "Logging Error",
-  "Logging Warning",
-  "Mgmt Debugging Alarm",
-  "Configuration File Update Failed",
-  "Unable to Establish Manager User-Interface Services",
-  "Ping Failure",
-  "",
-  "Add OEM Alarm",
-  "",
+  "Unknown Alarm",                                        // 0
+  "[TrafficManager] Traffic Server process was reset.",   // 1
+  "[TrafficManager] Traffic Server process established.", // 2
+  "",                                                     // 3
+  "",                                                     // 4
+  "Invalid Configuration",                                // 5
+  "System Error",                                         // 6
+  "",                                                     // 7
+  "Cache Error",                                          // 8
+  "Cache Warning",                                        // 9
+  "Logging Error",                                        // 10
+  "Logging Warning",                                      // 11
+  "",                                                     // 12
+  "",                                                     // 13
+  "Alarms configuration update failed",                   // 14
+  "Ping Failure",                                         // 15
+  "",                                                     // 16
+  "Alarms configuration error",                           // 17
 };
 
 const int alarmTextNum = sizeof(alarmText) / sizeof(char *);
@@ -73,7 +72,6 @@ Alarms::Alarms()
 {
   cur_cb = 0;
   ink_mutex_init(&mutex);
-  alarmOEMcount = minOEMkey;
 } /* End Alarms::Alarms */
 
 Alarms::~Alarms()
@@ -166,24 +164,12 @@ Alarms::signalAlarm(alarm_t a, const char *desc, const char *ip)
     break;
   case MGMT_ALARM_PROXY_CACHE_WARNING:
     return;
-  case MGMT_ALARM_PROXY_PEER_BORN:
-    priority = 3;
-    break;
-  case MGMT_ALARM_PROXY_PEER_DIED:
-    priority = 3;
-    break;
-  case MGMT_ALARM_PING_FAILURE:
-    priority = 1;
-    break;
   case MGMT_ALARM_PROXY_PROCESS_DIED:
     priority = 1;
     break;
   case MGMT_ALARM_PROXY_PROCESS_BORN:
     mgmt_log("[Alarms::signalAlarm] Server Process born\n");
     return;
-  case MGMT_ALARM_ADD_ALARM:
-    priority = 2;
-    break;
   default:
     priority = 2;
     break;
@@ -222,12 +208,6 @@ Alarms::signalAlarm(alarm_t a, const char *desc, const char *ip)
 
   ink_mutex_acquire(&mutex);
   if (!ip) {
-    // if an OEM alarm, then must create the unique key alarm type;
-    // this key is used to hash the new OEM alarm description in the hash table
-    if (a == MGMT_ALARM_ADD_ALARM) {
-      a = (alarmOEMcount - minOEMkey) % (maxOEMkey - minOEMkey) + minOEMkey;
-      alarmOEMcount++;
-    }
     snprintf(buf, sizeof(buf), "%d", a);
     if (local_alarms.find(buf) != local_alarms.end()) {
       ink_mutex_release(&mutex);
diff --git a/mgmt/Alarms.h b/mgmt/Alarms.h
index ce3317e..e861a45 100644
--- a/mgmt/Alarms.h
+++ b/mgmt/Alarms.h
@@ -40,36 +40,28 @@ class AppVersionInfo;
 // When adding new alarms, please make sure add the
 //   corresponding alarm text
 //
+#define MGMT_ALARM_UNDEFINED 0
+
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-#define MGMT_ALARM_PROXY_PEER_BORN 3 /* Data is ip addr */
-#define MGMT_ALARM_PROXY_PEER_DIED 4
+// Currently unused: 3
+// Currently unused: 4
 #define MGMT_ALARM_PROXY_CONFIG_ERROR 5 /* Data is descriptive string */
 #define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-#define MGMT_ALARM_PROXY_LOG_SPACE_CRISIS 7
+// Currently unused: 7
 #define MGMT_ALARM_PROXY_CACHE_ERROR 8
 #define MGMT_ALARM_PROXY_CACHE_WARNING 9
 #define MGMT_ALARM_PROXY_LOGGING_ERROR 10
 #define MGMT_ALARM_PROXY_LOGGING_WARNING 11
-#define MGMT_ALARM_MGMT_TEST 13 /* to aid in debugging */
+// Currently unused: 13
 #define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-#define MGMT_ALARM_WEB_ERROR 15
-#define MGMT_ALARM_PING_FAILURE 16
+// Currently unused: 15
+// Currently unused: 16
 #define MGMT_ALARM_MGMT_CONFIG_ERROR 17
-#define MGMT_ALARM_ADD_ALARM 18              /* OEM_ALARM */
-#define MGMT_ALARM_PROXY_LOG_SPACE_ROLLED 19 /* Alarm when log files will be rolled */
-
-#define MGMT_ALARM_SAC_SERVER_DOWN 400
 
 extern const char *alarmText[];
 extern const int alarmTextNum;
 
-/* OEM_ALARM: the alarm type is used as a key for hash tables;
-   need offset and modulo constants which will keep the unique
-   keys for OEM alarms within a specified range */
-const int minOEMkey = 1000; // used as offset
-const int maxOEMkey = 6000;
-
 typedef int alarm_t;
 typedef void (*AlarmCallbackFunc)(alarm_t, const char *, const char *);
 
@@ -116,10 +108,4 @@ private:
   std::unordered_map<std::string, AlarmCallbackFunc> cblist;
   std::unordered_map<std::string, Alarm *> local_alarms;
   std::unordered_map<std::string, Alarm *> remote_alarms;
-
-  /* counter is added in order to provide unique keys for OEM alarms,
-     since an OEM_ALARM type can be associated with many different
-     alarm descriptions */
-  int alarmOEMcount;
-
 }; /* End class Alarms */
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 291c0cd..6cfd57e 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -70,12 +70,12 @@
 
 // Signal flows: traffic server -> traffic manager
 #define MGMT_SIGNAL_PID 0
-#define MGMT_SIGNAL_MACHINE_UP 1 /* Data is ip addr */
-#define MGMT_SIGNAL_MACHINE_DOWN 2
+// Currently unused: 1
+// Currently unused: 2
 #define MGMT_SIGNAL_CONFIG_ERROR 3 /* Data is descriptive string */
 #define MGMT_SIGNAL_SYSTEM_ERROR 4
-#define MGMT_SIGNAL_LOG_SPACE_CRISIS 5
-#define MGMT_SIGNAL_CONFIG_FILE_READ 6
+// Currently unused: 5
+// Currently unused: 6
 #define MGMT_SIGNAL_CACHE_ERROR 7
 #define MGMT_SIGNAL_CACHE_WARNING 8
 #define MGMT_SIGNAL_LOGGING_ERROR 9
@@ -84,13 +84,11 @@
 // Currently unused: 12
 // Currently unused: 13
 #define MGMT_SIGNAL_PLUGIN_SET_CONFIG 14
-#define MGMT_SIGNAL_LOG_FILES_ROLLED 15
+// Currently unused: 15
 #define MGMT_SIGNAL_LIBRECORDS 16
-
+// Currently unused: 17 - 21
 #define MGMT_SIGNAL_CONFIG_FILE_CHILD 22
 
-#define MGMT_SIGNAL_SAC_SERVER_DOWN 400
-
 struct MgmtMessageHdr {
   int msg_id;
   int data_len;
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 3c33dc7..a834e68 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -493,25 +493,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
     RecSetRecordInt("proxy.node.proxy_running", 1, REC_SOURCE_DEFAULT);
     break;
 
-  case MGMT_SIGNAL_MACHINE_UP:
-    /*
-       {
-       struct in_addr addr;
-       addr.s_addr = *((unsigned int*)data_raw);
-       alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PEER_BORN, inet_ntoa(addr));
-       }
-     */
-    break;
-  case MGMT_SIGNAL_MACHINE_DOWN:
-    /*
-       {
-       struct in_addr addr;
-       addr.s_addr = *((unsigned int*)data_raw);
-       alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PEER_DIED, inet_ntoa(addr));
-       }
-     */
-    break;
-
   // FIX: This is very messy need to correlate mgmt signals and
   // alarms better
   case MGMT_SIGNAL_CONFIG_ERROR:
@@ -520,9 +501,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
   case MGMT_SIGNAL_SYSTEM_ERROR:
     alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_SYSTEM_ERROR, data_raw);
     break;
-  case MGMT_SIGNAL_LOG_SPACE_CRISIS:
-    alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_LOG_SPACE_CRISIS, data_raw);
-    break;
   case MGMT_SIGNAL_CACHE_ERROR:
     alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_CACHE_ERROR, data_raw);
     break;
@@ -535,9 +513,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
   case MGMT_SIGNAL_LOGGING_WARNING:
     alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_LOGGING_WARNING, data_raw);
     break;
-  case MGMT_SIGNAL_CONFIG_FILE_READ:
-    mgmt_log("[LocalManager::handleMgmtMsgFromProcesses] File done '%d'\n", data_raw);
-    break;
   case MGMT_SIGNAL_PLUGIN_SET_CONFIG: {
     char var_name[256];
     char var_value[256];
@@ -562,10 +537,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
       break;
     }
   } break;
-  case MGMT_SIGNAL_LOG_FILES_ROLLED: {
-    Debug("lm", "Rolling logs %s", (char *)data_raw);
-    break;
-  }
   case MGMT_SIGNAL_LIBRECORDS:
     if (mh->data_len > 0) {
       executeMgmtCallback(MGMT_SIGNAL_LIBRECORDS, {data_raw, static_cast<size_t>(mh->data_len)});
@@ -588,9 +559,6 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
     ats_free_null(parent);
     ats_free_null(child);
   } break;
-  case MGMT_SIGNAL_SAC_SERVER_DOWN:
-    alarm_keeper->signalAlarm(MGMT_ALARM_SAC_SERVER_DOWN, data_raw);
-    break;
 
   default:
     break;
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
index 5ee8fd8..3c1eb0e 100644
--- a/mgmt/api/CoreAPIShared.cc
+++ b/mgmt/api/CoreAPIShared.cc
@@ -300,16 +300,10 @@ get_event_id(const char *event_name)
     return MGMT_ALARM_PROXY_PROCESS_DIED;
   } else if (strcmp("MGMT_ALARM_PROXY_PROCESS_BORN", event_name) == 0) {
     return MGMT_ALARM_PROXY_PROCESS_BORN;
-  } else if (strcmp("MGMT_ALARM_PROXY_PEER_BORN", event_name) == 0) {
-    return MGMT_ALARM_PROXY_PEER_BORN;
-  } else if (strcmp("MGMT_ALARM_PROXY_PEER_DIED", event_name) == 0) {
-    return MGMT_ALARM_PROXY_PEER_DIED;
   } else if (strcmp("MGMT_ALARM_PROXY_CONFIG_ERROR", event_name) == 0) {
     return MGMT_ALARM_PROXY_CONFIG_ERROR;
   } else if (strcmp("MGMT_ALARM_PROXY_SYSTEM_ERROR", event_name) == 0) {
     return MGMT_ALARM_PROXY_SYSTEM_ERROR;
-  } else if (strcmp("MGMT_ALARM_PROXY_LOG_SPACE_CRISIS", event_name) == 0) {
-    return MGMT_ALARM_PROXY_LOG_SPACE_CRISIS;
   } else if (strcmp("MGMT_ALARM_PROXY_CACHE_ERROR", event_name) == 0) {
     return MGMT_ALARM_PROXY_CACHE_ERROR;
   } else if (strcmp("MGMT_ALARM_PROXY_CACHE_WARNING", event_name) == 0) {
@@ -318,14 +312,8 @@ get_event_id(const char *event_name)
     return MGMT_ALARM_PROXY_LOGGING_ERROR;
   } else if (strcmp("MGMT_ALARM_PROXY_LOGGING_WARNING", event_name) == 0) {
     return MGMT_ALARM_PROXY_LOGGING_WARNING;
-  } else if (strcmp("MGMT_ALARM_MGMT_TEST", event_name) == 0) {
-    return MGMT_ALARM_MGMT_TEST;
   } else if (strcmp("MGMT_ALARM_CONFIG_UPDATE_FAILED", event_name) == 0) {
     return MGMT_ALARM_CONFIG_UPDATE_FAILED;
-  } else if (strcmp("MGMT_ALARM_WEB_ERROR", event_name) == 0) {
-    return MGMT_ALARM_WEB_ERROR;
-  } else if (strcmp("MGMT_ALARM_PING_FAILURE", event_name) == 0) {
-    return MGMT_ALARM_PING_FAILURE;
   }
 
   return -1;
@@ -350,21 +338,12 @@ get_event_name(int id)
   case MGMT_ALARM_PROXY_PROCESS_BORN:
     ink_strlcpy(name, "MGMT_ALARM_PROXY_PROCESS_BORN", sizeof(name));
     break;
-  case MGMT_ALARM_PROXY_PEER_BORN:
-    ink_strlcpy(name, "MGMT_ALARM_PROXY_PEER_BORN", sizeof(name));
-    break;
-  case MGMT_ALARM_PROXY_PEER_DIED:
-    ink_strlcpy(name, "MGMT_ALARM_PROXY_PEER_DIED", sizeof(name));
-    break;
   case MGMT_ALARM_PROXY_CONFIG_ERROR:
     ink_strlcpy(name, "MGMT_ALARM_PROXY_CONFIG_ERROR", sizeof(name));
     break;
   case MGMT_ALARM_PROXY_SYSTEM_ERROR:
     ink_strlcpy(name, "MGMT_ALARM_PROXY_SYSTEM_ERROR", sizeof(name));
     break;
-  case MGMT_ALARM_PROXY_LOG_SPACE_CRISIS:
-    ink_strlcpy(name, "MGMT_ALARM_PROXY_LOG_SPACE_CRISIS", sizeof(name));
-    break;
   case MGMT_ALARM_PROXY_CACHE_ERROR:
     ink_strlcpy(name, "MGMT_ALARM_PROXY_CACHE_ERROR", sizeof(name));
     break;
@@ -377,24 +356,12 @@ get_event_name(int id)
   case MGMT_ALARM_PROXY_LOGGING_WARNING:
     ink_strlcpy(name, "MGMT_ALARM_PROXY_LOGGING_WARNING", sizeof(name));
     break;
-  case MGMT_ALARM_MGMT_TEST:
-    ink_strlcpy(name, "MGMT_ALARM_MGMT_TEST", sizeof(name));
-    break;
   case MGMT_ALARM_CONFIG_UPDATE_FAILED:
     ink_strlcpy(name, "MGMT_ALARM_CONFIG_UPDATE_FAILED", sizeof(name));
     break;
-  case MGMT_ALARM_WEB_ERROR:
-    ink_strlcpy(name, "MGMT_ALARM_WEB_ERROR", sizeof(name));
-    break;
-  case MGMT_ALARM_PING_FAILURE:
-    ink_strlcpy(name, "MGMT_ALARM_PING_FAILURE", sizeof(name));
-    break;
   case MGMT_ALARM_MGMT_CONFIG_ERROR:
     ink_strlcpy(name, "MGMT_ALARM_MGMT_CONFIG_ERROR", sizeof(name));
     break;
-  case MGMT_ALARM_ADD_ALARM:
-    ink_strlcpy(name, "MGMT_ALARM_ADD_ALARM", sizeof(name));
-    break;
   default:
     return nullptr;
   }
diff --git a/mgmt/api/CoreAPIShared.h b/mgmt/api/CoreAPIShared.h
index eaa8682..310ba35 100644
--- a/mgmt/api/CoreAPIShared.h
+++ b/mgmt/api/CoreAPIShared.h
@@ -44,24 +44,24 @@
  * access to these values for its event handling
  */
 #define MGMT_ALARM_UNDEFINED 0
+
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-#define MGMT_ALARM_PROXY_PEER_BORN 3
-#define MGMT_ALARM_PROXY_PEER_DIED 4
+// Currently unused: 3
+// Currently unused: 4
 #define MGMT_ALARM_PROXY_CONFIG_ERROR 5
 #define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-#define MGMT_ALARM_PROXY_LOG_SPACE_CRISIS 7
+// Currently unused: 7
 #define MGMT_ALARM_PROXY_CACHE_ERROR 8
 #define MGMT_ALARM_PROXY_CACHE_WARNING 9
 #define MGMT_ALARM_PROXY_LOGGING_ERROR 10
 #define MGMT_ALARM_PROXY_LOGGING_WARNING 11
 // Currently unused: 12
-#define MGMT_ALARM_MGMT_TEST 13
+// Currently unused: 13
 #define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-#define MGMT_ALARM_WEB_ERROR 15
-#define MGMT_ALARM_PING_FAILURE 16
+// Currently unused: 15
+// Currently unused: 16
 #define MGMT_ALARM_MGMT_CONFIG_ERROR 17
-#define MGMT_ALARM_ADD_ALARM 18
 
 // used by TSReadFromUrl
 #define HTTP_DIVIDER "\r\n\r\n"
diff --git a/mgmt/api/include/mgmtapi.h b/mgmt/api/include/mgmtapi.h
index c88c0df..dcc8cd7 100644
--- a/mgmt/api/include/mgmtapi.h
+++ b/mgmt/api/include/mgmtapi.h
@@ -507,15 +507,6 @@ tsapi TSMgmtError TSRecordSetMlt(TSList rec_list, TSActionNeedT *action_need);
  * by specifying the event's name (which is predefined and immutable).
  */
 
-/* UNIMPLEMENTED - wait for new alarm processor */
-/* TSEventSignal: enables the user to trigger an event
- * Input:  event_name - "MGMT_ALARM_ADD_ALARM"
- *         ...        - variable argument list of parameters that go
- *                       go into event description when it is signalled
- * Output: TSMgmtError
- */
-/*tsapi TSMgmtError               TSEventSignal (char *event_name, ...); */
-
 /* TSEventResolve: enables the user to resolve an event
  * Input:  event_name - event to resolve
  * Output: TSMgmtError
diff --git a/src/traffic_manager/traffic_manager.cc b/src/traffic_manager/traffic_manager.cc
index f7d3835..4768a51 100644
--- a/src/traffic_manager/traffic_manager.cc
+++ b/src/traffic_manager/traffic_manager.cc
@@ -671,14 +671,12 @@ main(int argc, const char **argv)
   mode_t oldmask = umask(0);
   mode_t newmode = api_socket_is_restricted() ? 00700 : 00777;
 
-  int mgmtapiFD         = -1; // FD for the api interface to issue commands
-  int eventapiFD        = -1; // FD for the api and clients to handle event callbacks
-  char mgmtapiFailMsg[] = "Traffic server management API service Interface Failed to Initialize.";
+  int mgmtapiFD  = -1; // FD for the api interface to issue commands
+  int eventapiFD = -1; // FD for the api and clients to handle event callbacks
 
   mgmtapiFD = bind_unix_domain_socket(apisock.c_str(), newmode);
   if (mgmtapiFD == -1) {
     mgmt_log("[WebIntrMain] Unable to set up socket for handling management API calls. API socket path = %s\n", apisock.c_str());
-    lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, mgmtapiFailMsg);
   }
 
   eventapiFD = bind_unix_domain_socket(eventsock.c_str(), newmode);


[trafficserver] 02/03: Removes the email feature of the Alarms subsystem

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit fb3e59cf881c7b71eb0e9c759fa156add1a343fb
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri May 10 13:40:48 2019 -0600

    Removes the email feature of the Alarms subsystem
    
    In addition, the following two configurations are gone:
    
       proxy.config.admin.admin_user
       proxy.config.alarm_email
    
    This closes #5459
---
 contrib/python/compare_RecordsConfigcc.py                |  1 -
 doc/admin-guide/files/records.config.en.rst              | 16 ----------------
 doc/admin-guide/monitoring/alarms.en.rst                 | 13 -------------
 .../LC_MESSAGES/admin-guide/files/records.config.en.po   |  4 ----
 .../ja/LC_MESSAGES/admin-guide/monitoring/alarms.en.po   |  8 --------
 lib/perl/lib/Apache/TS/AdminClient.pm                    |  2 --
 mgmt/Alarms.cc                                           | 14 ++------------
 mgmt/RecordsConfig.cc                                    |  4 ----
 8 files changed, 2 insertions(+), 60 deletions(-)

diff --git a/contrib/python/compare_RecordsConfigcc.py b/contrib/python/compare_RecordsConfigcc.py
index b01a133..90835c9 100644
--- a/contrib/python/compare_RecordsConfigcc.py
+++ b/contrib/python/compare_RecordsConfigcc.py
@@ -32,7 +32,6 @@ ignore_keys = {
     "proxy.config.ssl.server.cert.path": 1,
     "proxy.config.admin.user_id": 1,
     "proxy.config.ssl.client.cert.path": 1,
-    "proxy.config.alarm_email": 1,
     "proxy.config.log.logfile_dir": 1,
     "proxy.config.ssl.CA.cert.path": 1,
     "proxy.config.ssl.client.CA.cert.path": 1,
diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index 4065b56..8f877ba 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -551,22 +551,6 @@ Local Manager
 Alarm Configuration
 ===================
 
-.. ts:cv:: CONFIG proxy.config.alarm_email STRING
-   :reloadable:
-
-   The address to which the alarm script should send email.
-
-.. ts:cv:: CONFIG proxy.config.alarm.bin STRING example_alarm_bin.sh
-   :reloadable:
-
-   Name of the script file that can execute certain actions when
-   an alarm is signaled. The script is invoked with up to 4 arguments:
-
-   - The alarm message.
-   - The value of :ts:cv:`proxy.config.product_name`.
-   - The value of :ts:cv:`proxy.config.admin.user_id`.
-   - The value of :ts:cv:`proxy.config.alarm_email`.
-
 .. ts:cv:: CONFIG proxy.config.alarm.abs_path STRING NULL
    :reloadable:
 
diff --git a/doc/admin-guide/monitoring/alarms.en.rst b/doc/admin-guide/monitoring/alarms.en.rst
index f3c085d..08c1422 100644
--- a/doc/admin-guide/monitoring/alarms.en.rst
+++ b/doc/admin-guide/monitoring/alarms.en.rst
@@ -26,19 +26,6 @@ Traffic Manager Alarms
 allocated to event logs could be full or |TS| may not be able to write to a
 configuration file.
 
-Email Alarms
-============
-
-To configure |TS| to send an email to a specific address whenever an alarm
-occurs, follow the steps below:
-
-#. Set :ts:cv:`proxy.config.alarm_email` in :file:`records.config` to the email
-   address you want to receive alarm notifications. ::
-
-        CONFIG proxy.config.alarm_email STRING alerts@example.com
-
-#. Run the command :option:`traffic_ctl config reload` to apply the configuration changes.
-
 Using a Script File for Alarms
 ------------------------------
 
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
index 806eed4..05e603e 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/files/records.config.en.po
@@ -1096,10 +1096,6 @@ msgstr ""
 msgid "The value of :ts:cv:`proxy.config.admin.user_id`."
 msgstr ""
 
-#: ../../../admin-guide/files/records.config.en.rst:627
-msgid "The value of :ts:cv:`proxy.config.alarm_email`."
-msgstr ""
-
 #: ../../../admin-guide/files/records.config.en.rst:632
 msgid ""
 "The absolute path to the directory containing the alarm script. If this is "
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/alarms.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/alarms.en.po
index 81841d7..a879e29 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/alarms.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/alarms.en.po
@@ -53,14 +53,6 @@ msgstr ""
 "アラームが発生したときに |TS| が指定したアドレスに E メールを送信するように"
 "設定するには、以下の手順に従ってください。"
 
-#: ../../../admin-guide/monitoring/alarms.en.rst:35
-msgid ""
-"Set :ts:cv:`proxy.config.alarm_email` in :file:`records.config` to the "
-"email address you want to receive alarm notifications. ::"
-msgstr ""
-":file:`records.config` の :ts:cv:`proxy.config.alarm_email` にアラーム通知を"
-"受け取りたいメールアドレスを設定 ::"
-
 #: ../../../admin-guide/monitoring/alarms.en.rst:40
 msgid ""
 "Run the command :option:`traffic_ctl config reload` to apply the "
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index 9892a90..e53e357 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -317,14 +317,12 @@ The Apache Traffic Server Administration Manual will explain what these strings
 
  proxy.config.accept_threads
  proxy.config.task_threads
- proxy.config.admin.admin_user
  proxy.config.admin.synthetic_port
  proxy.config.admin.cli_path
  proxy.config.admin.number_config_bak
  proxy.config.admin.user_id
  proxy.config.alarm.abs_path
  proxy.config.alarm.bin
- proxy.config.alarm_email
  proxy.config.alarm.script_runtime
  proxy.config.bandwidth_mgmt.filename
  proxy.config.bin_path
diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index a252274..839d1fd 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -350,11 +350,6 @@ Alarms::execAlarmBin(const char *desc)
     return;
   }
 
-  // get email info
-  alarm_email_from_name = REC_readString("proxy.config.product_name", nullptr);
-  alarm_email_from_addr = REC_readString("proxy.config.admin.admin_user", nullptr);
-  alarm_email_to_addr   = REC_readString("proxy.config.alarm_email", nullptr);
-
   ink_filepath_make(cmd_line, sizeof(cmd_line), bindir, alarm_bin);
 
 #ifdef POSIX_THREAD
@@ -391,13 +386,8 @@ Alarms::execAlarmBin(const char *desc)
       waitpid(pid, &status, 0); // to reap the thread
     }
   } else {
-    int res;
-    if (alarm_email_from_name && alarm_email_from_addr && alarm_email_to_addr) {
-      res = execl(cmd_line, (const char *)alarm_bin, desc, (const char *)alarm_email_from_name, (const char *)alarm_email_from_addr,
-                  (const char *)alarm_email_to_addr, (char *)nullptr);
-    } else {
-      res = execl(cmd_line, (const char *)alarm_bin, desc, (char *)nullptr);
-    }
+    int res = execl(cmd_line, (const char *)alarm_bin, desc, (char *)nullptr);
+
     _exit(res);
   }
 }
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4dbb24c..fdc79c1 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -63,8 +63,6 @@ static const RecordElement RecordsConfig[] =
   // Jira TS-21
   {RECT_CONFIG, "proxy.config.local_state_dir", RECD_STRING, TS_BUILD_RUNTIMEDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
-  {RECT_CONFIG, "proxy.config.alarm_email", RECD_STRING, TS_PKGSYSUSER, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
-  ,
   {RECT_CONFIG, "proxy.config.syslog_facility", RECD_STRING, "LOG_DAEMON", RECU_RESTART_TM, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
   //# Negative core limit means max out limit
@@ -246,8 +244,6 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.admin.autoconf.localhost_only", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.admin.admin_user", RECD_STRING, "admin", RECU_DYNAMIC, RR_REQUIRED, RECC_STR, ".+", RECA_NO_ACCESS}
-  ,
   {RECT_CONFIG, "proxy.config.admin.number_config_bak", RECD_INT, "3", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.admin.user_id", RECD_STRING, TS_PKGSYSUSER, RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_READ_ONLY}


[trafficserver] 03/03: Renumbers all the alarm codes / defines

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 5400e5aa02dd5e0315aa348c260a8ea0f57b5f21
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Mon May 13 15:58:22 2019 -0600

    Renumbers all the alarm codes / defines
---
 lib/records/I_RecAlarms.h  | 22 +++++++---------------
 lib/records/I_RecSignals.h | 27 ++++++++++++---------------
 mgmt/Alarms.cc             | 24 +++++++++---------------
 mgmt/Alarms.h              | 21 +++++++--------------
 mgmt/BaseManager.h         | 30 +++++++++++++-----------------
 mgmt/api/CoreAPIShared.cc  |  3 ---
 mgmt/api/CoreAPIShared.h   | 22 +++++++---------------
 7 files changed, 55 insertions(+), 94 deletions(-)

diff --git a/lib/records/I_RecAlarms.h b/lib/records/I_RecAlarms.h
index a3dc5b8..f4843c9 100644
--- a/lib/records/I_RecAlarms.h
+++ b/lib/records/I_RecAlarms.h
@@ -28,18 +28,10 @@
 
 #define REC_ALARM_PROXY_PROCESS_DIED 1
 #define REC_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define REC_ALARM_PROXY_CONFIG_ERROR 5
-#define REC_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define REC_ALARM_PROXY_CACHE_ERROR 8
-#define REC_ALARM_PROXY_CACHE_WARNING 9
-#define REC_ALARM_PROXY_LOGGING_ERROR 10
-#define REC_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 12
-// Currently unused: 13
-#define REC_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define REC_ALARM_REC_CONFIG_ERROR 17
+#define REC_ALARM_PROXY_CONFIG_ERROR 3
+#define REC_ALARM_PROXY_SYSTEM_ERROR 4
+#define REC_ALARM_PROXY_CACHE_ERROR 5
+#define REC_ALARM_PROXY_CACHE_WARNING 6
+#define REC_ALARM_PROXY_LOGGING_ERROR 7
+#define REC_ALARM_PROXY_LOGGING_WARNING 8
+#define REC_ALARM_CONFIG_UPDATE_FAILED 9
diff --git a/lib/records/I_RecSignals.h b/lib/records/I_RecSignals.h
index 69d72bb..2f1d5ab 100644
--- a/lib/records/I_RecSignals.h
+++ b/lib/records/I_RecSignals.h
@@ -24,21 +24,18 @@
 #pragma once
 
 // copy from mgmt/BaseManager.h
-
 #define REC_SIGNAL_PID 0
-// Currently unused: 1
-// Currently unused: 2
+
+#define REC_SIGNAL_PROXY_PROCESS_DIED 1
+#define REC_SIGNAL_PROXY_PROCESS_BORN 2
 #define REC_SIGNAL_CONFIG_ERROR 3
 #define REC_SIGNAL_SYSTEM_ERROR 4
-// Currently unused: 5
-// Currently unused: 6
-#define REC_SIGNAL_CACHE_ERROR 7
-#define REC_SIGNAL_CACHE_WARNING 8
-#define REC_SIGNAL_LOGGING_ERROR 9
-#define REC_SIGNAL_LOGGING_WARNING 10
-// Currently unused: 11 - 13
-#define REC_SIGNAL_PLUGIN_SET_CONFIG 14
-// Currently unused: 15
-#define REC_SIGNAL_LIBRECORDS 16
-// Currently unused: 17 - 21
-#define REC_SIGNAL_CONFIG_FILE_CHILD 22
+#define REC_SIGNAL_CACHE_ERROR 5
+#define REC_SIGNAL_CACHE_WARNING 6
+#define REC_SIGNAL_LOGGING_ERROR 7
+#define REC_SIGNAL_LOGGING_WARNING 8
+#define REC_SIGNAL_PLUGIN_SET_CONFIG 9
+
+// This are additional on top of the ones defined in Alarms.h. Que?
+#define REC_SIGNAL_LIBRECORDS 10
+#define REC_SIGNAL_CONFIG_FILE_CHILD 11
diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index 839d1fd..0d9752c 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -34,21 +34,15 @@ const char *alarmText[] = {
   "Unknown Alarm",                                        // 0
   "[TrafficManager] Traffic Server process was reset.",   // 1
   "[TrafficManager] Traffic Server process established.", // 2
-  "",                                                     // 3
-  "",                                                     // 4
-  "Invalid Configuration",                                // 5
-  "System Error",                                         // 6
-  "",                                                     // 7
-  "Cache Error",                                          // 8
-  "Cache Warning",                                        // 9
-  "Logging Error",                                        // 10
-  "Logging Warning",                                      // 11
-  "",                                                     // 12
-  "",                                                     // 13
-  "Alarms configuration update failed",                   // 14
-  "Ping Failure",                                         // 15
-  "",                                                     // 16
-  "Alarms configuration error",                           // 17
+  "Invalid Configuration",                                // 3
+  "System Error",                                         // 4
+  "Cache Error",                                          // 5
+  "Cache Warning",                                        // 6
+  "Logging Error",                                        // 7
+  "Logging Warning",                                      // 8
+  "Alarms configuration update failed",                   // 9
+  "Librecords",                                           // 10 (unclear if needed / used)
+  "Plugin set configuration",                             // 11 (unclear if needed / used)
 };
 
 const int alarmTextNum = sizeof(alarmText) / sizeof(char *);
diff --git a/mgmt/Alarms.h b/mgmt/Alarms.h
index e861a45..6e65e71 100644
--- a/mgmt/Alarms.h
+++ b/mgmt/Alarms.h
@@ -44,20 +44,13 @@ class AppVersionInfo;
 
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define MGMT_ALARM_PROXY_CONFIG_ERROR 5 /* Data is descriptive string */
-#define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define MGMT_ALARM_PROXY_CACHE_ERROR 8
-#define MGMT_ALARM_PROXY_CACHE_WARNING 9
-#define MGMT_ALARM_PROXY_LOGGING_ERROR 10
-#define MGMT_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 13
-#define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define MGMT_ALARM_MGMT_CONFIG_ERROR 17
+#define MGMT_ALARM_PROXY_CONFIG_ERROR 3
+#define MGMT_ALARM_PROXY_SYSTEM_ERROR 4
+#define MGMT_ALARM_PROXY_CACHE_ERROR 5
+#define MGMT_ALARM_PROXY_CACHE_WARNING 6
+#define MGMT_ALARM_PROXY_LOGGING_ERROR 7
+#define MGMT_ALARM_PROXY_LOGGING_WARNING 8
+#define MGMT_ALARM_CONFIG_UPDATE_FAILED 9
 
 extern const char *alarmText[];
 extern const int alarmTextNum;
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 6cfd57e..853acee 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -70,24 +70,20 @@
 
 // Signal flows: traffic server -> traffic manager
 #define MGMT_SIGNAL_PID 0
-// Currently unused: 1
-// Currently unused: 2
-#define MGMT_SIGNAL_CONFIG_ERROR 3 /* Data is descriptive string */
+
+#define MGMT_SIGNAL_PROXY_PROCESS_DIED 1
+#define MGMT_SIGNAL_PROXY_PROCESS_BORN 2
+#define MGMT_SIGNAL_CONFIG_ERROR 3
 #define MGMT_SIGNAL_SYSTEM_ERROR 4
-// Currently unused: 5
-// Currently unused: 6
-#define MGMT_SIGNAL_CACHE_ERROR 7
-#define MGMT_SIGNAL_CACHE_WARNING 8
-#define MGMT_SIGNAL_LOGGING_ERROR 9
-#define MGMT_SIGNAL_LOGGING_WARNING 10
-// Currently unused: 11
-// Currently unused: 12
-// Currently unused: 13
-#define MGMT_SIGNAL_PLUGIN_SET_CONFIG 14
-// Currently unused: 15
-#define MGMT_SIGNAL_LIBRECORDS 16
-// Currently unused: 17 - 21
-#define MGMT_SIGNAL_CONFIG_FILE_CHILD 22
+#define MGMT_SIGNAL_CACHE_ERROR 5
+#define MGMT_SIGNAL_CACHE_WARNING 6
+#define MGMT_SIGNAL_LOGGING_ERROR 7
+#define MGMT_SIGNAL_LOGGING_WARNING 8
+#define MGMT_SIGNAL_PLUGIN_SET_CONFIG 9
+
+// This are additional on top of the ones defined in Alarms.h. Que?
+#define MGMT_SIGNAL_LIBRECORDS 10
+#define MGMT_SIGNAL_CONFIG_FILE_CHILD 11
 
 struct MgmtMessageHdr {
   int msg_id;
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
index 3c1eb0e..25e9b34 100644
--- a/mgmt/api/CoreAPIShared.cc
+++ b/mgmt/api/CoreAPIShared.cc
@@ -359,9 +359,6 @@ get_event_name(int id)
   case MGMT_ALARM_CONFIG_UPDATE_FAILED:
     ink_strlcpy(name, "MGMT_ALARM_CONFIG_UPDATE_FAILED", sizeof(name));
     break;
-  case MGMT_ALARM_MGMT_CONFIG_ERROR:
-    ink_strlcpy(name, "MGMT_ALARM_MGMT_CONFIG_ERROR", sizeof(name));
-    break;
   default:
     return nullptr;
   }
diff --git a/mgmt/api/CoreAPIShared.h b/mgmt/api/CoreAPIShared.h
index 310ba35..6718f8a 100644
--- a/mgmt/api/CoreAPIShared.h
+++ b/mgmt/api/CoreAPIShared.h
@@ -47,21 +47,13 @@
 
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define MGMT_ALARM_PROXY_CONFIG_ERROR 5
-#define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define MGMT_ALARM_PROXY_CACHE_ERROR 8
-#define MGMT_ALARM_PROXY_CACHE_WARNING 9
-#define MGMT_ALARM_PROXY_LOGGING_ERROR 10
-#define MGMT_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 12
-// Currently unused: 13
-#define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define MGMT_ALARM_MGMT_CONFIG_ERROR 17
+#define MGMT_ALARM_PROXY_CONFIG_ERROR 3
+#define MGMT_ALARM_PROXY_SYSTEM_ERROR 4
+#define MGMT_ALARM_PROXY_CACHE_ERROR 5
+#define MGMT_ALARM_PROXY_CACHE_WARNING 6
+#define MGMT_ALARM_PROXY_LOGGING_ERROR 7
+#define MGMT_ALARM_PROXY_LOGGING_WARNING 8
+#define MGMT_ALARM_CONFIG_UPDATE_FAILED 9
 
 // used by TSReadFromUrl
 #define HTTP_DIVIDER "\r\n\r\n"