Compare commits
No commits in common. "eee70f73dc21d77bf1902dc4186c137f3c0a5563" and "e889455d49a2b994d4047f9c9fcf79dfaf1080db" have entirely different histories.
eee70f73dc
...
e889455d49
|
@ -13,8 +13,6 @@ All notable changes to this project will be documented in this file.
|
||||||
- gitlab: https://gitlab.com/lindeas/jilo/-/compare/v0.1.1...HEAD
|
- gitlab: https://gitlab.com/lindeas/jilo/-/compare/v0.1.1...HEAD
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Added 'jitsi_components' table to handle events related to the platform health
|
|
||||||
- Added jicofo starting, xmpp registering and started events
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
38
jilo
38
jilo
|
@ -65,14 +65,11 @@ db_get_participant="SELECT * FROM participants WHERE endpoint_id = '%s';"
|
||||||
db_insert_participants_template="INSERT INTO participants (jitsi_component, endpoint_id, conference_id) VALUES ('%s', '%s', '%s');"
|
db_insert_participants_template="INSERT INTO participants (jitsi_component, endpoint_id, conference_id) VALUES ('%s', '%s', '%s');"
|
||||||
db_insert_participant_event_template="INSERT INTO participant_events (jitsi_component, loglevel, time, participant_id, event_type, event_param) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');"
|
db_insert_participant_event_template="INSERT INTO participant_events (jitsi_component, loglevel, time, participant_id, event_type, event_param) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');"
|
||||||
|
|
||||||
db_insert_jitsi_component_event_template="INSERT INTO jitsi_components (jitsi_component, loglevel, time, component_id, event_type, event_param) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');"
|
|
||||||
|
|
||||||
db_drop="
|
db_drop="
|
||||||
DROP TABLE IF EXISTS conferences;
|
DROP TABLE IF EXISTS conferences;
|
||||||
DROP TABLE IF EXISTS conference_events;
|
DROP TABLE IF EXISTS conference_events;
|
||||||
DROP TABLE IF EXISTS participants;
|
DROP TABLE IF EXISTS participants;
|
||||||
DROP TABLE IF EXISTS participant_events;
|
DROP TABLE IF EXISTS participant_events;
|
||||||
DROP TABLE IF EXISTS jitsi_components;
|
|
||||||
DROP TABLE IF EXISTS state;"
|
DROP TABLE IF EXISTS state;"
|
||||||
db_create="CREATE TABLE conferences (
|
db_create="CREATE TABLE conferences (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
@ -108,15 +105,6 @@ CREATE TABLE participant_events (
|
||||||
event_param TEXT,
|
event_param TEXT,
|
||||||
FOREIGN KEY (participant_id) REFERENCES participants(id)
|
FOREIGN KEY (participant_id) REFERENCES participants(id)
|
||||||
);
|
);
|
||||||
CREATE TABLE jitsi_components (
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
||||||
jitsi_component TEXT NOT NULL,
|
|
||||||
loglevel TEXT,
|
|
||||||
time TEXT NOT NULL,
|
|
||||||
component_id TEXT,
|
|
||||||
event_type TEXT,
|
|
||||||
event_param TEXT
|
|
||||||
);
|
|
||||||
CREATE TABLE state (
|
CREATE TABLE state (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
jitsi_component TEXT,
|
jitsi_component TEXT,
|
||||||
|
@ -135,7 +123,6 @@ DELETE FROM conferences;
|
||||||
DELETE FROM conference_events;
|
DELETE FROM conference_events;
|
||||||
DELETE FROM participants;
|
DELETE FROM participants;
|
||||||
DELETE FROM participant_events;
|
DELETE FROM participant_events;
|
||||||
DELETE FROM jitsi_components;
|
|
||||||
DELETE FROM state;"
|
DELETE FROM state;"
|
||||||
|
|
||||||
help="Usage:
|
help="Usage:
|
||||||
|
@ -358,31 +345,8 @@ jitsi_log_parse() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
JICOFO)
|
JICOFO)
|
||||||
|
|
||||||
# jicofo starting
|
|
||||||
if [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*Main\.main.*:\ Starting\ Jicofo\. ]]; then
|
|
||||||
event_time="${BASH_REMATCH[1]}"
|
|
||||||
loglevel="${BASH_REMATCH[2]}"
|
|
||||||
## FIXME a way to add some jicofo id and/or parameter
|
|
||||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo starting" "")
|
|
||||||
db_query "$db_insert"
|
|
||||||
|
|
||||||
# jicofo registered to xmpp
|
|
||||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[xmpp_connection=client\]\ XmppProvider\$connectionListener\$1\.authenticated.*:\ Registered\. ]]; then
|
|
||||||
event_time="${BASH_REMATCH[1]}"
|
|
||||||
loglevel="${BASH_REMATCH[2]}"
|
|
||||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo xmpp registered" "")
|
|
||||||
db_query "$db_insert"
|
|
||||||
|
|
||||||
# jicofo started
|
|
||||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JicofoServices\.\<init\>.*\ Registering\ GlobalMetrics\ periodic\ updates\. ]]; then
|
|
||||||
event_time="${BASH_REMATCH[1]}"
|
|
||||||
loglevel="${BASH_REMATCH[2]}"
|
|
||||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo started" "")
|
|
||||||
db_query "$db_insert"
|
|
||||||
|
|
||||||
# locate conference starting event
|
# locate conference starting event
|
||||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then
|
if [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then
|
||||||
event_time="${BASH_REMATCH[1]}"
|
event_time="${BASH_REMATCH[1]}"
|
||||||
loglevel="${BASH_REMATCH[2]}"
|
loglevel="${BASH_REMATCH[2]}"
|
||||||
conference_id="0" # FIXME here we still don't have the jicofo room ID
|
conference_id="0" # FIXME here we still don't have the jicofo room ID
|
||||||
|
|
|
@ -51,27 +51,6 @@ regex
|
||||||
|
|
||||||
## JICOFO
|
## JICOFO
|
||||||
|
|
||||||
### jicofo starting
|
|
||||||
needed: *timestamp, loglevel* (it's good to find a way to diferentiate the jicofo by some id (IP, hostname, etc.)
|
|
||||||
|
|
||||||
regex:
|
|
||||||
|
|
||||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*Main\.main.*:\ Starting\ Jicofo\.```
|
|
||||||
|
|
||||||
### jicofo registered to xmpp
|
|
||||||
needed: *timestamp, loglevel*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[xmpp_connection=client\]\ XmppProvider\$connectionListener\$1\.authenticated.*:\ Registered\.```
|
|
||||||
|
|
||||||
### jicofo started
|
|
||||||
needed: *timestamp, loglevel*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JicofoServices\.\<init\>.*\ Registering\ GlobalMetrics\ periodic\ updates\.```
|
|
||||||
|
|
||||||
### conference start
|
### conference start
|
||||||
needed: *timestamp, loglevel, conferenceName,* (**FIXME**: we don't have *conferenceID* here, it's good to have it)
|
needed: *timestamp, loglevel, conferenceName,* (**FIXME**: we don't have *conferenceID* here, it's good to have it)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue