Commit 33c98b60 authored by Adam Wujek's avatar Adam Wujek

snmp: keep track if radiusvlan is running

add new OID: wrsStartCntRvlan
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent e8cdf6d1
......@@ -772,6 +772,7 @@ list of faults leading to a data error.
\snmpadd{WR-SWITCH-MIB::wrsStartCntLldpd}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntSPLL}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntLdap}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntRvlan}\\
\snmpadd{WR-SWITCH-MIB::wrsBootUserspaceDaemonsMissing}\\
\snmpadd{WR-SWITCH-MIB::wrsBootSuccessful} \\
\snmpadd{WR-SWITCH-MIB::wrsOSStatus}\\
......
......@@ -579,6 +579,7 @@
\snmpentrye{WR-SWITCH-MIB}{wrsStartCntGroup}{wrsStartCntWrsWatchdog}{}
\snmpentrye{WR-SWITCH-MIB}{wrsStartCntGroup}{wrsStartCntLldpd}{}
\snmpentrye{WR-SWITCH-MIB}{wrsStartCntGroup}{wrsStartCntLdap}{}
\snmpentrye{WR-SWITCH-MIB}{wrsStartCntGroup}{wrsStartCntRvlan}{}
\snmpentrye{WR-SWITCH-MIB}{wrsStartCntGroup}{wrsStartCntSPLL}{Not implemented}
\snmpentrye{WR-SWITCH-MIB}{}{wrsSpllState}{}
......
......@@ -1359,6 +1359,14 @@ wrsStartCntLdap OBJECT-TYPE
"Number of LDAP daemon starts"
::= { wrsStartCntGroup 10 }
wrsStartCntRvlan OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of radiusvlan daemon starts"
::= { wrsStartCntGroup 11 }
-- wrsSpllState (.7.3)
wrsSpllState OBJECT IDENTIFIER ::= { wrsExpertStatus 3 }
......
......@@ -128,6 +128,7 @@
"wrsStartCntWrsWatchdog" "1.3.6.1.4.1.96.100.7.2.8"
"wrsStartCntLldpd" "1.3.6.1.4.1.96.100.7.2.9"
"wrsStartCntLdap" "1.3.6.1.4.1.96.100.7.2.10"
"wrsStartCntRvlan" "1.3.6.1.4.1.96.100.7.2.11"
"wrsSpllState" "1.3.6.1.4.1.96.100.7.3"
"wrsSpllVersionGroup" "1.3.6.1.4.1.96.100.7.3.1"
"wrsSpllVersion" "1.3.6.1.4.1.96.100.7.3.1.1"
......
......@@ -106,6 +106,8 @@ struct wrs_usd_item userspace_daemons[] = {
dot-config */
[UDI_NSLCD] = {"/usr/sbin/nslcd", 1}, /* nslcd/LDAP can be disabled in
dot-config */
[UDI_RVLAN] = {"/usr/sbin/radiusvlan", 1}, /* radius/802.1X can be disabled in
dot-config */
};
struct wrs_bc_item {
......@@ -496,7 +498,17 @@ static void update_daemon_expectancy(struct wrs_usd_item *daemon_array)
daemon_array[UDI_NSLCD].exp = 1;
snmp_log(LOG_INFO, "SNMP: " SL_INFO
" wrsBootUserspaceDaemonsMissing:"
"no CONFIG_LDAP_ENABLE in dot-config\n");
" no CONFIG_LDAP_ENABLE in dot-config\n");
}
daemon_array[UDI_RVLAN].exp = 0;
tmp = libwr_cfg_get("RVLAN_DAEMON");
if (tmp && !strcmp(tmp, "y")) {
/* SNMP should not expect radiusvlan to be running */
daemon_array[UDI_RVLAN].exp = 1;
snmp_log(LOG_INFO, "SNMP: " SL_INFO
" wrsBootUserspaceDaemonsMissing:"
" no CONFIG_RVLAN_DAEMON in dot-config\n");
}
}
......
......@@ -119,6 +119,7 @@ struct wrs_usd_item {
#define UDI_MONIT 5 /* index of MONIT in userspace_daemons array */
#define UDI_LLDP 8 /* index of LLDP in userspace_daemons array */
#define UDI_NSLCD 9 /* index of NSLCD (LDAP) in userspace_daemons array */
#define UDI_RVLAN 10 /* index of radiusvlan (802.1X) in userspace_daemons array */
/* user space daemon list */
/* - key contain process name reported by ps command
* - positive exp describe exact number of expected processes
......
......@@ -10,6 +10,7 @@
#define START_CNT_WRSWATCHDOG "/tmp/start_cnt_wrs_watchdog"
#define START_CNT_LLDPD "/tmp/start_cnt_lldpd"
#define START_CNT_LDAP "/tmp/start_cnt_ldap"
#define START_CNT_RVLAN "/tmp/start_cnt_rvlan"
/* This structure is defined in read in wrsBootStatusGroup.c.
It is used here to know which deamons are disabled and
......@@ -27,6 +28,7 @@ static struct pickinfo wrsStartCnt_pickinfo[] = {
FIELD(wrsStartCnt_s, ASN_COUNTER, wrsStartCntWrsWatchdog),
FIELD(wrsStartCnt_s, ASN_COUNTER, wrsStartCntLldpd),
FIELD(wrsStartCnt_s, ASN_COUNTER, wrsStartCntLdap),
FIELD(wrsStartCnt_s, ASN_COUNTER, wrsStartCntRvlan),
};
struct wrsStartCnt_s wrsStartCnt_s;
......@@ -97,6 +99,9 @@ time_t wrsStartCnt_data_fill(void){
if(userspace_daemons[UDI_NSLCD].exp) /* check only if enabled (exp != 0) */
read_start_count(START_CNT_LDAP, &wrsStartCnt_s.wrsStartCntLdap);
if(userspace_daemons[UDI_RVLAN].exp) /* check only if enabled (exp != 0) */
read_start_count(START_CNT_RVLAN, &wrsStartCnt_s.wrsStartCntRvlan);
/* there was an update, return current time */
return time_update;
}
......
......@@ -15,6 +15,7 @@ struct wrsStartCnt_s {
uint32_t wrsStartCntWrsWatchdog;
uint32_t wrsStartCntLldpd;
uint32_t wrsStartCntLdap;
uint32_t wrsStartCntRvlan;
};
extern struct wrsStartCnt_s wrsStartCnt_s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment