Compare commits
No commits in common. "main" and "v0.1.1" have entirely different histories.
|
@ -13,13 +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
|
||||
|
||||
### Added
|
||||
- Added 'jitsi_components' table to handle events related to the platform health
|
||||
- Added jicofo starting, xmpp registering and started events
|
||||
- Added jvb added, removed and lost events
|
||||
- Added jvb health-check scheduled and stopped events
|
||||
- Added "no operational bridges" and "no bridge available" events
|
||||
- Added "jitsi-component" service level events search in jilo-cli
|
||||
- Added initial version of jilo-web, PHP web interface to jilo (then moved to own repo)
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
|
||||
Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
||||
|
||||
This is the command line tools repository. For a web interface to query Jilo, go to the **"[jilo-web](https://work.lindeas.com/redirect.php?url=jilo-web)"** repository.
|
||||
|
||||
The webpage for this project is https://lindeas.com/jilo. There you will find information about both Jilo and Jilo Web.
|
||||
|
||||
The main git repo of **Jilo** is:
|
||||
The webpage for this project is https://lindeas.com/jilo. The main git repo is:
|
||||
- https://code.lindeas.com/lindeas/jilo
|
||||
|
||||
It is mirrored at:
|
||||
|
@ -41,8 +37,11 @@ It needs access to the jilo database.
|
|||
You can install it in the following ways:
|
||||
|
||||
- use the latest deb package from the **[APT repo](https://lindeas.com/debian)** - recommended for Debian/Ubuntu
|
||||
|
||||
- use the latest **RPM package** - recommended for rpm-based systems
|
||||
|
||||
- download the latest release from the **"Releases"** section here
|
||||
|
||||
- clone the **git repo**:
|
||||
```bash
|
||||
git clone https://github.com/lindeas/jilo.git
|
||||
|
|
145
jilo
145
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_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="
|
||||
DROP TABLE IF EXISTS conferences;
|
||||
DROP TABLE IF EXISTS conference_events;
|
||||
DROP TABLE IF EXISTS participants;
|
||||
DROP TABLE IF EXISTS participant_events;
|
||||
DROP TABLE IF EXISTS jitsi_components;
|
||||
DROP TABLE IF EXISTS state;"
|
||||
db_create="CREATE TABLE conferences (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
@ -108,15 +105,6 @@ CREATE TABLE participant_events (
|
|||
event_param TEXT,
|
||||
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 (
|
||||
id INTEGER PRIMARY KEY,
|
||||
jitsi_component TEXT,
|
||||
|
@ -135,7 +123,6 @@ DELETE FROM conferences;
|
|||
DELETE FROM conference_events;
|
||||
DELETE FROM participants;
|
||||
DELETE FROM participant_events;
|
||||
DELETE FROM jitsi_components;
|
||||
DELETE FROM state;"
|
||||
|
||||
help="Usage:
|
||||
|
@ -294,21 +281,6 @@ jitsi_log_parse() {
|
|||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference created" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# locate the conference ending event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference expired" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# the conference ended, forget about it
|
||||
unset "$conference_id" "$conference_name"
|
||||
|
||||
# locate participant joining event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
|
@ -354,112 +326,27 @@ jitsi_log_parse() {
|
|||
# the participant left, forget about him
|
||||
unset "$participant_endpoint_id" "$participant_stats_id" "$participant_IP"
|
||||
|
||||
# locate the conference ending event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference expired" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# the conference ended, forget about it
|
||||
unset "$conference_id" "$conference_name"
|
||||
|
||||
fi
|
||||
;;
|
||||
|
||||
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"
|
||||
|
||||
# bridge added
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.addJvbAddress.*:\ Added\ new\ videobridge:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*), ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
jvb_id="${BASH_REMATCH[3]}"
|
||||
jvb_version="${BASH_REMATCH[4]}"
|
||||
jvb_region="${BASH_REMATCH[5]}"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb added" "")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb version" "$jvb_version")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb region" "$jvb_region")
|
||||
db_query "$db_insert"
|
||||
|
||||
# bridge removed
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Removing\ JVB:\ .*@.*\/(.*) ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
jvb_id="${BASH_REMATCH[3]}"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb removed" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# bridge lost (just in case the removal was not detected)
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Lost\ a\ bridge:\ .*@.*\/(.*) ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
jvb_id="${BASH_REMATCH[3]}"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb lost" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# bridge healthcheck scheduled
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeAdded.*:\ Scheduled\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*), ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
jvb_id="${BASH_REMATCH[3]}"
|
||||
jvb_version="${BASH_REMATCH[4]}"
|
||||
jvb_region="${BASH_REMATCH[5]}"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb health-check scheduled" "")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb version" "$jvb_version")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb region" "$jvb_region")
|
||||
db_query "$db_insert"
|
||||
|
||||
# bridge healthcheck stopped
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeRemoved.*:\ Stopping\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*), ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
jvb_id="${BASH_REMATCH[3]}"
|
||||
jvb_version="${BASH_REMATCH[4]}"
|
||||
jvb_region="${BASH_REMATCH[5]}"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb health-check stopped" "")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb version" "$jvb_version")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb region" "$jvb_region")
|
||||
db_query "$db_insert"
|
||||
|
||||
# WARNING no opertional bridges
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*BridgeSelector\.selectBridge.*\ There\ are\ no\ operational\ bridges\. ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "no operational bridges" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# ERROR no bridge available
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+).*:\ Can\ not\ invite\ participant,\ no\ bridge\ available\. ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[4]}"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "no bridge available" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# 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]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="0" # FIXME here we still don't have the jicofo room ID
|
||||
|
|
142
jilo-cli
142
jilo-cli
|
@ -58,24 +58,23 @@ SELECT DISTINCT
|
|||
WHERE
|
||||
ce.conference_id = c.conference_id
|
||||
AND
|
||||
ce.conference_event = 'conference created')
|
||||
ce.conference_event = 'conference expired')
|
||||
AS start,
|
||||
(SELECT ce.time
|
||||
FROM conference_events ce
|
||||
WHERE
|
||||
ce.conference_id = c.conference_id
|
||||
AND
|
||||
ce.conference_event = 'conference expired')
|
||||
ce.conference_event = 'conference created')
|
||||
AS end,
|
||||
c.conference_id,
|
||||
c.conference_name,
|
||||
(SELECT COUNT(pe.participant_id)
|
||||
(SELECT COUNT(pe.participant_id) AS participants
|
||||
FROM participant_events pe
|
||||
WHERE
|
||||
pe.event_type = 'participant joining'
|
||||
AND
|
||||
pe.event_param = c.conference_id)
|
||||
AS participants,
|
||||
pe.event_param = c.conference_id),
|
||||
name_counts.name_count,
|
||||
c.conference_host
|
||||
FROM
|
||||
|
@ -91,7 +90,7 @@ JOIN (
|
|||
) AS name_counts ON c.conference_name = name_counts.conference_name
|
||||
JOIN
|
||||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE (ce.time >= '%s 00:00:00' AND ce.time <= '%s 23:59:59')
|
||||
WHERE (ce.time >= '%s' AND ce.time <= '%s')
|
||||
ORDER BY
|
||||
c.id;"
|
||||
|
||||
|
@ -115,7 +114,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
c.conference_id = '%s'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -134,7 +133,7 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
c.conference_id = '%s'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -159,7 +158,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
c.conference_name = '%s'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -178,7 +177,7 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
c.conference_name = '%s'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -193,7 +192,7 @@ FROM
|
|||
JOIN
|
||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
|
||||
pe.time >= '%s' AND pe.time <= '%s'
|
||||
ORDER BY p.id;"
|
||||
|
||||
db_conference_by_participant_id_template="
|
||||
|
@ -216,7 +215,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
p.endpoint_id = '%s'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -235,7 +234,7 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
participant_id = '%s'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -260,7 +259,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
c.conference_id = '%s'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -279,7 +278,7 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
ce.conference_id = '%s'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -304,7 +303,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
c.conference_name LIKE '%%%s%%'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -322,7 +321,7 @@ FROM
|
|||
LEFT JOIN
|
||||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE c.conference_name LIKE '%%%s%%'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -347,7 +346,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
pe.event_type = 'stats_id' AND pe.event_param LIKE '%%%s%%'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -366,7 +365,7 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
event_type = 'stats_id' AND event_param LIKE '%%%s%%'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -391,7 +390,7 @@ LEFT JOIN
|
|||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
pe.event_type = 'pair selected' AND pe.event_param = '%s'
|
||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
||||
AND (pe.time >= '%s' AND pe.time <= '%s')
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -410,29 +409,11 @@ LEFT JOIN
|
|||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
event_type = 'pair selected' AND event_param = '%s'
|
||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
||||
AND (event_time >= '%s' AND event_time <= '%s')
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
||||
## jitsi component related
|
||||
|
||||
# we use "jitsi_component = %s" (without quotes)
|
||||
# to re-use the query for all components ("jitsi_component = jitsi_component")
|
||||
# for specific component the single quotes are added upon loading the template
|
||||
db_jitsi_components_template="
|
||||
SELECT jitsi_component, loglevel, time, component_id, event_type, event_param
|
||||
FROM
|
||||
jitsi_components
|
||||
WHERE
|
||||
jitsi_component = %s
|
||||
AND
|
||||
component_id = %s
|
||||
AND
|
||||
(time >= '%s 00:00:00' AND time <= '%s 23:59:59')
|
||||
ORDER BY
|
||||
time;"
|
||||
|
||||
## time period related
|
||||
|
||||
db_events_by_period_template="
|
||||
|
@ -454,7 +435,7 @@ LEFT JOIN
|
|||
LEFT JOIN
|
||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||
WHERE
|
||||
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
|
||||
pe.time >= '%s' AND pe.time <= '%s'
|
||||
|
||||
UNION
|
||||
|
||||
|
@ -472,7 +453,7 @@ FROM
|
|||
LEFT JOIN
|
||||
conference_events ce ON c.conference_id = ce.conference_id
|
||||
WHERE
|
||||
event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59'
|
||||
event_time >= '%s' AND event_time <= '%s'
|
||||
|
||||
ORDER BY
|
||||
pe.time;"
|
||||
|
@ -483,8 +464,7 @@ help="Usage:
|
|||
Options:
|
||||
--conference|-c [conference ID or name] - show specific conference(s), all of empty
|
||||
--participant|-p [participant endpoint ID, conference ID, conference name, participant IP, or participant stats ID] - show specific participant(s), all if empty
|
||||
--jitsi-component|-j [jvb|jicofo] - show service level events
|
||||
--time|-t - show stats for a time interval; can be use separately ot together with -c, -p, or -j
|
||||
--time|-t - show stats for a time interval; can be use separately ot together with -c or -p
|
||||
--verbose|-v - show more details, when available
|
||||
--silent|-s - show less details, more suitable for scripting
|
||||
--help|-h - show this help message
|
||||
|
@ -636,8 +616,6 @@ conference_arg=""
|
|||
conference_option=false
|
||||
participant_arg=""
|
||||
participant_option=false
|
||||
component_arg=""
|
||||
component_option=false
|
||||
from_time="0000-00-00"
|
||||
until_time="9999-12-31"
|
||||
time_option=false
|
||||
|
@ -670,19 +648,6 @@ while [[ $# -gt 0 ]]; do
|
|||
shift
|
||||
fi
|
||||
;;
|
||||
-j | --jitsi-component)
|
||||
component_option=true
|
||||
if [[ -n "$2" && "$2" != -* ]]; then
|
||||
component_arg="$2"
|
||||
shift 2
|
||||
if [[ -n "$1" && "$1" != -* ]]; then
|
||||
component_id="$1"
|
||||
shift
|
||||
fi
|
||||
else
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
-t | --time)
|
||||
time_option=true
|
||||
if [[ -n "$2" && "$2" != -* ]]; then
|
||||
|
@ -805,7 +770,7 @@ if [[ "$conference_option" == true ]]; then
|
|||
fi
|
||||
# prepare the formatted rows
|
||||
for row in "${conference_array[@]}"; do
|
||||
IFS='|' read -r jitsi_component start end conference_id conference_name participants name_count conference_host <<< "$row"
|
||||
IFS='|' read -r jitsi_component end start conference_id conference_name participants name_count conference_host <<< "$row"
|
||||
calculate_duration "$start" "$end"
|
||||
output+="$jitsi_component\t$duration\t$conference_id\t$conference_name\t$participants\t$name_count\t$conference_host\n"
|
||||
done
|
||||
|
@ -1000,65 +965,6 @@ elif [[ "$participant_option" == true ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
elif [[ "$component_option" == true ]]; then
|
||||
|
||||
# argument for "--jitsi-component | -j" can be "jvb", "jicofo"
|
||||
if [[ -n "$component_arg" ]]; then
|
||||
case "$component_arg" in
|
||||
jvb)
|
||||
jitsi_component="'JVB'"
|
||||
;;
|
||||
jicofo)
|
||||
jitsi_component="'JICOFO'"
|
||||
;;
|
||||
id)
|
||||
component_id="$component_id"
|
||||
;;
|
||||
*)
|
||||
# we have a component events search, but an unknown component string
|
||||
# exiting with error, it's not a recognized option argument
|
||||
echo "Invalid option: $component_arg" >&2
|
||||
echo -e "$help"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ -z "$jitsi_component" ]]; then
|
||||
jitsi_component="jitsi_component"
|
||||
header="\nJitsi components events for $IMPORTANT_TEXT""all components$NORMAL_TEXT"
|
||||
else
|
||||
header="\nJitsi components events for $IMPORTANT_TEXT$jitsi_component$NORMAL_TEXT"
|
||||
fi
|
||||
|
||||
if [[ -z "$component_id" ]]; then
|
||||
component_id="component_id"
|
||||
else
|
||||
component_id="'$component_id'"
|
||||
header="\nJitsi events for component ID $IMPORTANT_TEXT$component_id$NORMAL_TEXT"
|
||||
fi
|
||||
|
||||
db_jitsi_components=$(printf "$db_jitsi_components_template" "$jitsi_component" "$component_id" "$from_time" "$until_time")
|
||||
mapfile -t jitsi_components < <(db_query "$db_jitsi_components")
|
||||
|
||||
output=""
|
||||
# prepare the header
|
||||
if [[ "$silent" != true ]]; then
|
||||
if [[ "$time_range_specified" == true ]]; then
|
||||
header+=" for the time period \"$from_time - $until_time\""
|
||||
fi
|
||||
header+="\n"
|
||||
echo -e "$header"
|
||||
output+="jitsi_component\tloglevel\ttime\tcomponent ID\tevent\tparameter\n"
|
||||
fi
|
||||
# prepare the formatted rows
|
||||
for row in "${jitsi_components[@]}"; do
|
||||
IFS='|' read -r jitsi_component loglevel time component_id event_type event_param <<< "$row"
|
||||
output+="$jitsi_component\t$loglevel\t$time\t$component_id\t$event_type\t$event_param\n"
|
||||
done
|
||||
# output
|
||||
echo -e "$output" | column -t -s $'\t'
|
||||
|
||||
elif [[ "$time_option" == true ]]; then
|
||||
|
||||
if [[ "$time_range_specified" == true ]]; then
|
||||
|
|
174
log-regexps.md
174
log-regexps.md
|
@ -2,19 +2,7 @@
|
|||
|
||||
This is a reference of the log lines and the corresponding regexps that are used in Jilo for events tracking.
|
||||
|
||||
```
|
||||
<COMPONENT>
|
||||
<event>
|
||||
needed: data being searched for in the log line
|
||||
usage:
|
||||
example Jilo command lines related to the event
|
||||
log
|
||||
example log line with the data about the event
|
||||
regex
|
||||
the regular expression for searching the event
|
||||
```
|
||||
|
||||
Work in progress: 2024.06.25
|
||||
Work in progress: 2024.06.16
|
||||
|
||||
----
|
||||
|
||||
|
@ -23,12 +11,6 @@ Work in progress: 2024.06.25
|
|||
### conference start
|
||||
needed: *timestamp, loglevel, conferenceID, conferenceName, conferenceDomain*
|
||||
|
||||
usage:
|
||||
|
||||
**```jilo-cli -c conferenceID```**
|
||||
|
||||
**```jilo-cli -c conferenceName```**
|
||||
|
||||
log
|
||||
|
||||
```JVB 2024-04-01 04:08:55.124 INFO: [19046] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] EndpointConnectionStatusMonitor.start#58: Starting connection status monitor```
|
||||
|
@ -40,37 +22,13 @@ regex
|
|||
### conference end
|
||||
needed: *timestamp, loglevel, conferenceID* (optionally in case we don't have the starting event: *conferenceName, conferenceDomain*)
|
||||
|
||||
usage:
|
||||
|
||||
**```jilo-cli -c conferenceID```**
|
||||
|
||||
**```jilo-cli -c conferenceName```**
|
||||
|
||||
log
|
||||
|
||||
```JVB 2024-04-01 03:52:39.116 INFO: [19031] [confId=8c116568f5201f28 conf_name=someroom123@conference.meex.example.com meeting_id=a5449477] Conference.expire#595: Expiring.```
|
||||
```JVB 2024-04-01 03:04:24.339 INFO: [18981] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] EndpointConnectionStatusMonitor.stop#66: Stopped```
|
||||
|
||||
regex
|
||||
|
||||
```JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire```
|
||||
|
||||
### participant joining
|
||||
## participant joining
|
||||
needed: *timestamp, loglevel, conferenceID, endpointID, statsID*
|
||||
|
||||
usage:
|
||||
|
||||
**```jilo-cli -c conferenceID```**
|
||||
|
||||
**```jilo-cli -c conferenceName```**
|
||||
|
||||
**```jilo-cli -p endpointID```**
|
||||
|
||||
**```jilo-cli -p statsID```**
|
||||
|
||||
log
|
||||
|
||||
```JVB 2024-04-01 03:02:53.411 INFO: [18968] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=660d9565 stats_id=Elva-jQ6 local_ufrag=9eici1hqbpo5dq] IceTransport.startConnectivityEstablishment#205: Starting the Agent without remote candidates.```
|
||||
|
||||
regex
|
||||
|
||||
```JVB ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates```
|
||||
|
@ -78,22 +36,6 @@ regex
|
|||
### pair selection
|
||||
needed: *timestamp, loglevel, conferenceID, endpointID, statsID, participant IP address*
|
||||
|
||||
usage:
|
||||
|
||||
**```jilo-cli -c conferenceID```**
|
||||
|
||||
**```jilo-cli -c conferenceName```**
|
||||
|
||||
**```jilo-cli -p endpointID```**
|
||||
|
||||
**```jilo-cli -p statsID```**
|
||||
|
||||
**```jilo-cli -p participant_IP_address```**
|
||||
|
||||
log
|
||||
|
||||
```JVB 2024-04-01 03:02:53.907 INFO: [18971] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=660d9565 stats_id=Elva-jQ6 local_ufrag=9eici1hqbpo5dq ufrag=9eici1hqbpo5dq name=stream-660d9565] CheckList.handleNominationConfirmed#406: Selected pair for stream stream-660d9565.RTP: SERVER_IP:10000/udp/srflx -> PARTICIPANT_IP:61542/udp/prflx (stream-660d9565.RTP)```
|
||||
|
||||
regex
|
||||
|
||||
```JVB ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\ .*Selected\ pair\ for\ stream\ .*([0-9.]+):10000/udp/srflx\ \-\>\ ([0-9.]+):[0-9]+/udp/prflx```
|
||||
|
@ -101,18 +43,6 @@ regex
|
|||
### participant leaving
|
||||
needed: *timestamp, loglevel, conferenceID, endpointID, statsID*
|
||||
|
||||
usage:
|
||||
|
||||
**```jilo-cli -c conferenceID```**
|
||||
|
||||
**```jilo-cli -c conferenceName```**
|
||||
|
||||
**```jilo-cli -p endpointID```**
|
||||
|
||||
log
|
||||
|
||||
```JVB 2024-04-01 03:03:04.440 INFO: [18967] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=ef00c95e stats_id=Joseph-kU4] Endpoint.expire#1155: Expired.```
|
||||
|
||||
regex
|
||||
|
||||
```JVB ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\.```
|
||||
|
@ -121,104 +51,6 @@ regex
|
|||
|
||||
## 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\.```
|
||||
|
||||
### jvb added
|
||||
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-18 18:38:07.378 INFO: [33] BridgeSelector.addJvbAddress#96: Added new videobridge: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.addJvbAddress.*:\ Added\ new\ videobridge:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),.*region=(.*),```
|
||||
|
||||
### jvb removed
|
||||
needed: *timestamp, loglevel, jvbID*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-22 12:20:38.713 INFO: [1401] BridgeSelector.removeJvbAddress#109: Removing JVB: jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Removing\ JVB:\ .*@.*\/(.*)```
|
||||
|
||||
### jvb lost (just in case the removal was not detected)
|
||||
needed: *timestamp, loglevel, jvbID*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-22 12:20:38.713 WARNING: [1401] BridgeSelector.removeJvbAddress#112: Lost a bridge: jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Lost\ a\ bridge:\ .*@.*\/(.*)```
|
||||
|
||||
### jvb health-check scheduled
|
||||
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-22 12:22:03.707 INFO: [40] JvbDoctor.bridgeAdded#128: Scheduled health-check task for: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeAdded.*:\ Scheduled\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*),```
|
||||
|
||||
### jvb health-check stopped
|
||||
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-22 12:20:38.733 INFO: [40] JvbDoctor.bridgeRemoved#105: Stopping health-check task for: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeRemoved.*:\ Stopping\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*),```
|
||||
|
||||
### Warning: no operational bridges
|
||||
needed: *timestamp, loglevel*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-25 10:44:18.727 WARNING: [2505] BridgeSelector.selectBridge#182: There are no operational bridges.```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*BridgeSelector\.selectBridge.*\ There\ are\ no\ operational\ bridges\.```
|
||||
|
||||
### Severe: no bridge available
|
||||
needed: *timestamp, loglevel, conferenceID*
|
||||
|
||||
log
|
||||
|
||||
```Jicofo 2024-06-25 10:44:18.727 SEVERE: [2505] [room=fewfewf-wfwegf@conference.meet.example.com meeting_id=750c7bcc-d9fb-4b8b-a085-dcf6b5c99546 participant=49e3837d] ParticipantInviteRunnable.doRun#218: Can not invite participant, no bridge available.```
|
||||
|
||||
regex
|
||||
|
||||
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+).*:\ Can\ not\ invite\ participant,\ no\ bridge\ available\.```
|
||||
|
||||
### conference start
|
||||
needed: *timestamp, loglevel, conferenceName,* (**FIXME**: we don't have *conferenceID* here, it's good to have it)
|
||||
|
||||
|
|
Loading…
Reference in New Issue