Compare commits
No commits in common. "main" and "v0.1" have entirely different histories.
|
@ -1,5 +1,4 @@
|
||||||
*.log
|
*.log
|
||||||
*.log.*
|
*.log.*
|
||||||
|
jitsi-stats.db
|
||||||
jilo.db
|
jilo.db
|
||||||
packaging/deb-package/
|
|
||||||
packaging/rpm-package/
|
|
||||||
|
|
68
CHANGELOG.md
68
CHANGELOG.md
|
@ -1,68 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Unreleased
|
|
||||||
|
|
||||||
#### Links
|
|
||||||
- upstream: https://code.lindeas.com/lindeas/jilo/compare/v0.1.1...HEAD
|
|
||||||
- codeberg: https://codeberg.org/lindeas/jilo/compare/v0.1.1...HEAD
|
|
||||||
- github: https://github.com/lindeas/jilo/compare/v0.1.1...HEAD
|
|
||||||
- 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
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 0.1.1 - 2024-06-18
|
|
||||||
|
|
||||||
#### Links
|
|
||||||
- upstream: https://code.lindeas.com/lindeas/jilo/compare/v0.1...v0.1.1
|
|
||||||
- codeberg: https://codeberg.org/lindeas/jilo/compare/v0.1...v0.1.1
|
|
||||||
- github: https://github.com/lindeas/jilo/compare/v0.1...v0.1.1
|
|
||||||
- gitlab: https://gitlab.com/lindeas/jilo/-/compare/v0.1...v0.1.1
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- Initial changelog following the keepachangelog.com format
|
|
||||||
- Added "silent" option to jilo-cli, suitable for scripting
|
|
||||||
- Added time duration and number of participants in conferences listings
|
|
||||||
- Added man page
|
|
||||||
- Added build resources and scripts for DEB and RPM packages
|
|
||||||
- Initial build of the DEB and RPM packages
|
|
||||||
- Added DEB repository
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- Updated the way jilo-cli handles multiple options, added filtering conferences by time period
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixed an error in double counting of conferences in jilo-cli
|
|
||||||
|
|
||||||
|
|
||||||
## 0.1 - 2024-06-12
|
|
||||||
|
|
||||||
#### Links
|
|
||||||
- upstream: https://code.lindeas.com/lindeas/jilo/releases/tag/v0.1
|
|
||||||
- codeberg: https://codeberg.org/lindeas/jilo/releases/tag/v0.1
|
|
||||||
- github: https://github.com/lindeas/jilo/releases/tag/v0.1
|
|
||||||
- gitlab: https://gitlab.com/lindeas/jilo/-/releases/v0.1
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- Initial version of jilo and jilo-cli
|
|
||||||
- Basic functionality for JVB and Jicofo logs scanning
|
|
||||||
- Searching through conferences, participants, events and in time periods
|
|
||||||
- Detecting logs rotation and saving last parsed line
|
|
||||||
- Support for both SQLite3 and MySQL/MariaDB
|
|
||||||
- Minimal external dependencies, using Bash built-in commands as much as possible
|
|
15
README.md
15
README.md
|
@ -4,11 +4,7 @@
|
||||||
|
|
||||||
Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
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. The main git repo is:
|
||||||
|
|
||||||
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:
|
|
||||||
- https://code.lindeas.com/lindeas/jilo
|
- https://code.lindeas.com/lindeas/jilo
|
||||||
|
|
||||||
It is mirrored at:
|
It is mirrored at:
|
||||||
|
@ -22,7 +18,7 @@ You are welcome to send feedback with issues, comments and pull requests to a gi
|
||||||
|
|
||||||
## version
|
## version
|
||||||
|
|
||||||
Current version: **0.1.1** released on **2024-06-18**
|
Current version: **0.1** released on **2024-06-12**
|
||||||
|
|
||||||
## components
|
## components
|
||||||
|
|
||||||
|
@ -38,12 +34,7 @@ It needs access to the jilo database.
|
||||||
|
|
||||||
## installation
|
## installation
|
||||||
|
|
||||||
You can install it in the following ways:
|
Clone the git repo:
|
||||||
|
|
||||||
- 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
|
```bash
|
||||||
git clone https://github.com/lindeas/jilo.git
|
git clone https://github.com/lindeas/jilo.git
|
||||||
cd jilo
|
cd jilo
|
||||||
|
|
2
TODO.md
2
TODO.md
|
@ -12,7 +12,6 @@
|
||||||
- issues
|
- issues
|
||||||
- errors
|
- errors
|
||||||
- ~~info about JVBs used~~
|
- ~~info about JVBs used~~
|
||||||
- ~~add to conference listings: duration, number of participants~~
|
|
||||||
* Web interface
|
* Web interface
|
||||||
- initial version
|
- initial version
|
||||||
---
|
---
|
||||||
|
@ -21,4 +20,3 @@
|
||||||
- ~~finish SQL refactoring, move to separate tables for conferences and participants, linked by id~~
|
- ~~finish SQL refactoring, move to separate tables for conferences and participants, linked by id~~
|
||||||
- ~~update jilo-cli to work with new SQL~~
|
- ~~update jilo-cli to work with new SQL~~
|
||||||
- ~~fix sqlite and mysql schemas differences with the new SQL~~
|
- ~~fix sqlite and mysql schemas differences with the new SQL~~
|
||||||
- there is a bug in '-c CONFERENCE_ID' - it doesn't always show the first participant
|
|
||||||
|
|
149
jilo
149
jilo
|
@ -6,8 +6,8 @@
|
||||||
# Bash script for Jitsi Meet components (Videobridge, Jicofo, etc.) logs parsing
|
# Bash script for Jitsi Meet components (Videobridge, Jicofo, etc.) logs parsing
|
||||||
###
|
###
|
||||||
|
|
||||||
VERSION="0.1.1"
|
VERSION="0.1"
|
||||||
RELEASE_DATE="2024-06-18"
|
RELEASE_DATE="2024-06-12"
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
@ -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_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference created" "")
|
||||||
db_query "$db_insert"
|
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
|
# 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
|
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]}"
|
event_time="${BASH_REMATCH[1]}"
|
||||||
|
@ -354,112 +326,27 @@ jitsi_log_parse() {
|
||||||
# the participant left, forget about him
|
# the participant left, forget about him
|
||||||
unset "$participant_endpoint_id" "$participant_stats_id" "$participant_IP"
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
# 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
|
# 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
|
||||||
|
|
544
jilo-cli
544
jilo-cli
|
@ -7,8 +7,8 @@
|
||||||
# Command line interface (jilo-cli)
|
# Command line interface (jilo-cli)
|
||||||
###
|
###
|
||||||
|
|
||||||
VERSION="0.1.1"
|
VERSION="0.1"
|
||||||
RELEASE_DATE="2024-06-18"
|
RELEASE_DATE="2024-06-12"
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
||||||
|
|
||||||
|
@ -51,31 +51,10 @@ IMPORTANT_TEXT=${IMPORTANT_TEXT:-$DEFAULT_IMPORTANT_TEXT}
|
||||||
## conference related
|
## conference related
|
||||||
|
|
||||||
db_conferences_all_formatted_template="
|
db_conferences_all_formatted_template="
|
||||||
SELECT DISTINCT
|
SELECT
|
||||||
c.jitsi_component,
|
c.jitsi_component,
|
||||||
(SELECT ce.time
|
|
||||||
FROM conference_events ce
|
|
||||||
WHERE
|
|
||||||
ce.conference_id = c.conference_id
|
|
||||||
AND
|
|
||||||
ce.conference_event = 'conference created')
|
|
||||||
AS start,
|
|
||||||
(SELECT ce.time
|
|
||||||
FROM conference_events ce
|
|
||||||
WHERE
|
|
||||||
ce.conference_id = c.conference_id
|
|
||||||
AND
|
|
||||||
ce.conference_event = 'conference expired')
|
|
||||||
AS end,
|
|
||||||
c.conference_id,
|
c.conference_id,
|
||||||
c.conference_name,
|
c.conference_name,
|
||||||
(SELECT COUNT(pe.participant_id)
|
|
||||||
FROM participant_events pe
|
|
||||||
WHERE
|
|
||||||
pe.event_type = 'participant joining'
|
|
||||||
AND
|
|
||||||
pe.event_param = c.conference_id)
|
|
||||||
AS participants,
|
|
||||||
name_counts.name_count,
|
name_counts.name_count,
|
||||||
c.conference_host
|
c.conference_host
|
||||||
FROM
|
FROM
|
||||||
|
@ -89,12 +68,11 @@ JOIN (
|
||||||
GROUP BY
|
GROUP BY
|
||||||
conference_name
|
conference_name
|
||||||
) AS name_counts ON c.conference_name = name_counts.conference_name
|
) 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')
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
c.id;"
|
c.id;"
|
||||||
|
db_conferences_id_template="SELECT * FROM conferences WHERE conference_id='%s';"
|
||||||
|
db_conferences_name_template="SELECT * FROM conferences WHERE conference_name='%s';"
|
||||||
|
db_conference_events_template="SELECT * FROM conference_events WHERE conference_id='%s';"
|
||||||
db_conference_by_id_template="
|
db_conference_by_id_template="
|
||||||
SELECT
|
SELECT
|
||||||
pe.time,
|
pe.time,
|
||||||
|
@ -115,7 +93,6 @@ LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
c.conference_id = '%s'
|
c.conference_id = '%s'
|
||||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -134,11 +111,9 @@ LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
c.conference_id = '%s'
|
c.conference_id = '%s'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
|
||||||
db_conference_by_name_template="
|
db_conference_by_name_template="
|
||||||
SELECT
|
SELECT
|
||||||
pe.time,
|
pe.time,
|
||||||
|
@ -159,7 +134,6 @@ LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
c.conference_name = '%s'
|
c.conference_name = '%s'
|
||||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -178,23 +152,20 @@ LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
c.conference_name = '%s'
|
c.conference_name = '%s'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
|
||||||
## participant related
|
## participant related
|
||||||
|
|
||||||
db_participants_all_template="
|
db_participants_all_template="SELECT jitsi_component, endpoint_id, conference_id FROM participants ORDER BY id;"
|
||||||
SELECT DISTINCT
|
db_participants_id_template="SELECT * FROM participants WHERE endpoint_id='%s';"
|
||||||
p.jitsi_component, p.endpoint_id, p.conference_id
|
db_participant_events_template="SELECT * FROM participant_events WHERE participant_id='%s';"
|
||||||
FROM
|
|
||||||
participants p
|
db_participants_endpoint_template="SELECT * FROM participants WHERE endpoint_id='%s';"
|
||||||
JOIN
|
db_participants_conference_template="SELECT * FROM participants WHERE conference_id='%s';"
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
db_participants_statsid_template="SELECT * FROM participant_events WHERE event_type = 'stats_id' AND event_param LIKE '%%%s%%';"
|
||||||
WHERE
|
db_participants_ip_template="SELECT * FROM participant_events WHERE event_type = 'pair selected' AND event_param='%s';"
|
||||||
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
|
|
||||||
ORDER BY p.id;"
|
|
||||||
|
|
||||||
db_conference_by_participant_id_template="
|
db_conference_by_participant_id_template="
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -216,7 +187,6 @@ LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
p.endpoint_id = '%s'
|
p.endpoint_id = '%s'
|
||||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -235,7 +205,6 @@ LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
participant_id = '%s'
|
participant_id = '%s'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
@ -259,8 +228,7 @@ LEFT JOIN
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
c.conference_id = '%s'
|
pe.event_param = '%s'
|
||||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -278,51 +246,7 @@ FROM
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
ce.conference_id = '%s'
|
event_param = '%s'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
|
||||||
pe.time;"
|
|
||||||
|
|
||||||
db_participant_by_conference_name_template="
|
|
||||||
SELECT
|
|
||||||
pe.time,
|
|
||||||
c.conference_id,
|
|
||||||
c.conference_name,
|
|
||||||
c.conference_host,
|
|
||||||
pe.loglevel,
|
|
||||||
pe.event_type,
|
|
||||||
p.endpoint_id AS participant_id,
|
|
||||||
pe.event_param
|
|
||||||
FROM
|
|
||||||
conferences c
|
|
||||||
LEFT JOIN
|
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
|
||||||
LEFT JOIN
|
|
||||||
participants p ON c.conference_id = p.conference_id
|
|
||||||
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')
|
|
||||||
|
|
||||||
UNION
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
ce.time AS event_time,
|
|
||||||
c.conference_id,
|
|
||||||
c.conference_name,
|
|
||||||
c.conference_host,
|
|
||||||
ce.loglevel,
|
|
||||||
ce.conference_event AS event_type,
|
|
||||||
NULL AS participant_id,
|
|
||||||
ce.conference_param AS event_param
|
|
||||||
FROM
|
|
||||||
conferences c
|
|
||||||
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')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
@ -347,7 +271,6 @@ LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
pe.event_type = 'stats_id' AND pe.event_param LIKE '%%%s%%'
|
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')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -366,7 +289,6 @@ LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
event_type = 'stats_id' AND event_param LIKE '%%%s%%'
|
event_type = 'stats_id' AND event_param LIKE '%%%s%%'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
@ -391,7 +313,6 @@ LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
pe.event_type = 'pair selected' AND pe.event_param = '%s'
|
pe.event_type = 'pair selected' AND pe.event_param = '%s'
|
||||||
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -410,29 +331,10 @@ LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
event_type = 'pair selected' AND event_param = '%s'
|
event_type = 'pair selected' AND event_param = '%s'
|
||||||
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
|
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
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
|
## time period related
|
||||||
|
|
||||||
db_events_by_period_template="
|
db_events_by_period_template="
|
||||||
|
@ -454,7 +356,7 @@ LEFT JOIN
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
participant_events pe ON p.endpoint_id = pe.participant_id
|
participant_events pe ON p.endpoint_id = pe.participant_id
|
||||||
WHERE
|
WHERE
|
||||||
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
|
pe.time >= '%s' AND pe.time <= '%s'
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -472,21 +374,19 @@ FROM
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
conference_events ce ON c.conference_id = ce.conference_id
|
conference_events ce ON c.conference_id = ce.conference_id
|
||||||
WHERE
|
WHERE
|
||||||
event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59'
|
event_time >= '%s' AND event_time <= '%s'
|
||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
pe.time;"
|
pe.time;"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
help="Usage:
|
help="Usage:
|
||||||
$0 [OPTION]
|
$0 [OPTION]
|
||||||
Options:
|
Options:
|
||||||
--conference|-c [conference ID or name] - show specific conference(s), all of empty
|
--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
|
--participant|-p [participant endpoint ID, conference ID, 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
|
||||||
--time|-t - show stats for a time interval; can be use separately ot together with -c, -p, or -j
|
|
||||||
--verbose|-v - show more details, when available
|
|
||||||
--silent|-s - show less details, more suitable for scripting
|
|
||||||
--help|-h - show this help message
|
--help|-h - show this help message
|
||||||
--version|-V - show version"
|
--version|-V - show version"
|
||||||
|
|
||||||
|
@ -495,16 +395,6 @@ version="JILO Jitsi Logs Observer command line client
|
||||||
version $VERSION
|
version $VERSION
|
||||||
released on $RELEASE_DATE"
|
released on $RELEASE_DATE"
|
||||||
|
|
||||||
time_formats="Expected formats:
|
|
||||||
- exact times
|
|
||||||
YYYY-MM-DD, YYYY-MM, YYYY
|
|
||||||
- exact periods
|
|
||||||
YYYY-MM-DD:YYYY-MM-DD, YYYY-MM:YYYY-MM, YYYY:YYYY
|
|
||||||
- from begining to given time
|
|
||||||
:YYYY-MM-DD, :YYYY-MM, :YYYY
|
|
||||||
- from given time until end
|
|
||||||
YYYY-MM-DD:, YYYY-MM:, YYYY:"
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -607,53 +497,34 @@ parse_time_range() {
|
||||||
until_time="9999-12-31"
|
until_time="9999-12-31"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "Invalid time range. $time_formats" >&2
|
echo -e "Invalid time range. Expected formats:
|
||||||
|
- exact times
|
||||||
|
YYYY-MM-DD, YYYY-MM, YYYY
|
||||||
|
- exact periods
|
||||||
|
YYYY-MM-DD:YYYY-MM-DD, YYYY-MM:YYYY-MM, YYYY:YYYY
|
||||||
|
- from begining to given time
|
||||||
|
:YYYY-MM-DD, :YYYY-MM, :YYYY
|
||||||
|
- from given time until end
|
||||||
|
YYYY-MM-DD:, YYYY-MM:, YYYY:" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
time_range_specified=true
|
time_range_specified=true
|
||||||
}
|
}
|
||||||
|
|
||||||
# we have two timestamps in format YYYY-MM-DD HH:MM:SS.sss
|
|
||||||
# calculate and return the durtion in format HH:MM:SS
|
|
||||||
calculate_duration() {
|
|
||||||
start=$(date -d "$1" +"%s")
|
|
||||||
end=$(date -d "$2" +"%s")
|
|
||||||
duration_seconds=$((end - start))
|
|
||||||
hours=$((duration_seconds / 3600))
|
|
||||||
duration_seconds_remain=$((duration_seconds % 3600))
|
|
||||||
minutes=$((duration_seconds_remain / 60))
|
|
||||||
seconds=$((duration_seconds_remain % 60))
|
|
||||||
|
|
||||||
# add leading zeroes
|
|
||||||
duration=$(printf "%02d:%02d:%02d" $hours $minutes $seconds)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
### commandline options
|
### commandline options
|
||||||
|
|
||||||
|
cmd=""
|
||||||
conference_arg=""
|
conference_arg=""
|
||||||
conference_option=false
|
|
||||||
participant_arg=""
|
participant_arg=""
|
||||||
participant_option=false
|
from_time=""
|
||||||
component_arg=""
|
until_time=""
|
||||||
component_option=false
|
|
||||||
from_time="0000-00-00"
|
|
||||||
until_time="9999-12-31"
|
|
||||||
time_option=false
|
|
||||||
time_range_specified=false
|
time_range_specified=false
|
||||||
|
|
||||||
# display help if no arguments
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
echo -e "$help"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# then check all the options
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-c | --conference )
|
-c | --conference )
|
||||||
conference_option=true
|
cmd="--conference"
|
||||||
if [[ -n "$2" && "$2" != -* ]]; then
|
if [[ -n "$2" && "$2" != -* ]]; then
|
||||||
conference_arg="$2"
|
conference_arg="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -662,7 +533,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-p | --participant)
|
-p | --participant)
|
||||||
participant_option=true
|
cmd="--participant"
|
||||||
if [[ -n "$2" && "$2" != -* ]]; then
|
if [[ -n "$2" && "$2" != -* ]]; then
|
||||||
participant_arg="$2"
|
participant_arg="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -670,37 +541,16 @@ while [[ $# -gt 0 ]]; do
|
||||||
shift
|
shift
|
||||||
fi
|
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)
|
-t | --time)
|
||||||
time_option=true
|
cmd="--time"
|
||||||
if [[ -n "$2" && "$2" != -* ]]; then
|
if [[ -n "$2" && "$2" != -* ]]; then
|
||||||
parse_time_range "$2"
|
parse_time_range "$2"
|
||||||
shift 2
|
shift 2
|
||||||
else
|
else
|
||||||
echo "Option -t needs a time range argument. $time_formats" >&2
|
echo "Option -t needs time range argument in format 'from-time - until-time', YYYY-MM-DD - YYYY-MM-DD" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-v | --verbose)
|
|
||||||
verbose=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-s | --silent)
|
|
||||||
silent=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-h | --help)
|
-h | --help)
|
||||||
echo -e "$help"
|
echo -e "$help"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -717,34 +567,27 @@ while [[ $# -gt 0 ]]; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$conference_option" == true ]]; then
|
case "$cmd" in
|
||||||
|
|
||||||
|
--conference)
|
||||||
# the argument to "--conference" can be either ID or name
|
# the argument to "--conference" can be either ID or name
|
||||||
if [[ -n "$conference_arg" ]]; then
|
if [[ -n "$conference_arg" ]]; then
|
||||||
|
|
||||||
# check for conferences match within a time period (or all if not period given)
|
db_conferences_id=$(printf "$db_conferences_id_template" "$conference_arg")
|
||||||
db_conferences_id=$(printf "$db_conference_by_id_template" "$conference_arg" "$from_time" "$until_time" "$conference_arg" "$from_time" "$until_time")
|
conferences_id=$(db_query "$db_conferences_id")
|
||||||
mapfile -t conferences_id < <(db_query "$db_conferences_id")
|
|
||||||
db_conferences_name=$(printf "$db_conference_by_name_template" "$conference_arg" "$from_time" "$until_time" "$conference_arg" "$from_time" "$until_time")
|
db_conferences_name=$(printf "$db_conferences_name_template" "$conference_arg")
|
||||||
mapfile -t conferences_name < <(db_query "$db_conferences_name")
|
conferences_name=$(db_query "$db_conferences_name")
|
||||||
|
|
||||||
# we check if the argument to "--conference" is a conference ID
|
# we check if the argument to "--conference" is a conference ID
|
||||||
# conference ID is unique, so we show that conference
|
# conference ID is unique, so we show that conference
|
||||||
if [[ "${#conferences_id[@]}" -gt 0 ]]; then
|
if [[ -n "$conferences_id" ]]; then
|
||||||
|
db_conference=$(printf "$db_conference_by_id_template" "$conference_arg" "$conference_arg")
|
||||||
output=""
|
mapfile -t conference_array < <(db_query "$db_conference")
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
header="\nConferences with ID matching \"$IMPORTANT_TEXT$conference_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${conferences_id[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$IMPORTANT_TEXT$conference_id$NORMAL_TEXT\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
output+="$time\t$IMPORTANT_TEXT$conference_id$NORMAL_TEXT\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
||||||
done
|
done
|
||||||
|
@ -753,21 +596,14 @@ if [[ "$conference_option" == true ]]; then
|
||||||
|
|
||||||
# then we check if the argument to "--conference" is a conference name
|
# then we check if the argument to "--conference" is a conference name
|
||||||
# if so, we show all matching conferences (conference names are not unique)
|
# if so, we show all matching conferences (conference names are not unique)
|
||||||
elif [[ "${#conferences_name[@]}" -gt 0 ]]; then
|
elif [[ -n "$conferences_name" ]]; then
|
||||||
|
db_conference=$(printf "$db_conference_by_name_template" "$conference_arg" "$conference_arg")
|
||||||
|
mapfile -t conference_array < <(db_query "$db_conference")
|
||||||
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
header="\nConferences with names matching \"$IMPORTANT_TEXT$conference_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output="time\tconf ID\tconf name\tconf host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
output="time\tconf ID\tconf name\tconf host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${conferences_name[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$conference_id\t$IMPORTANT_TEXT$conference_name$NORMAL_TEXT\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
output+="$time\t$conference_id\t$IMPORTANT_TEXT$conference_name$NORMAL_TEXT\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
||||||
done
|
done
|
||||||
|
@ -776,92 +612,48 @@ if [[ "$conference_option" == true ]]; then
|
||||||
|
|
||||||
# nothing found for neither conference ID or name
|
# nothing found for neither conference ID or name
|
||||||
else
|
else
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
echo "No match found for \"$conference_arg\""
|
echo "No match found for \"$conference_arg\""
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
echo "and time period $from_time - $until_time"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
# if no argument is given, we show all the conferences
|
# if no argument is given, we show all the conferences
|
||||||
db_conferences_all=$(printf "$db_conferences_all_formatted_template" "$from_time" "$until_time")
|
mapfile -t conference_array < <(db_query "$db_conferences_all_formatted_template")
|
||||||
mapfile -t conference_array < <(db_query "$db_conferences_all")
|
|
||||||
|
|
||||||
# we only format the outrput if there are conferences to show
|
|
||||||
if [[ "${#conference_array[@]}" -gt 0 ]]; then
|
|
||||||
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
output="component\tconference ID\tconference name\tname count\tconference host\n"
|
||||||
header="\nAll conferences"
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$IMPORTANT_TEXT$from_time - $until_time$NORMAL_TEXT\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output="component\tduration\tconference ID\tconference name\tparticipants\tname count\tconference host\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${conference_array[@]}"; do
|
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 conference_id conference_name name_count conference_host <<< "$row"
|
||||||
calculate_duration "$start" "$end"
|
output+="$jitsi_component\t$conference_id\t$conference_name\t$name_count\t$conference_host\n"
|
||||||
output+="$jitsi_component\t$duration\t$conference_id\t$conference_name\t$participants\t$name_count\t$conference_host\n"
|
|
||||||
done
|
done
|
||||||
# output
|
# output
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
else
|
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
echo -n "No conferences found"
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
echo -n " for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
echo "."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
elif [[ "$participant_option" == true ]]; then
|
--participant)
|
||||||
|
# the argument to "--participant" can be endpointID, conferenceID, startsID, IP address
|
||||||
# the argument to "--participant" can be endpointID, conferenceID, conference name, startsID, IP address
|
|
||||||
# check for participants match within a time period (or all if period not given)
|
|
||||||
# we check for all ot them and show the matches
|
# we check for all ot them and show the matches
|
||||||
## FIXME - we don't catch the case with no results found at all, no message is displayed if no results ## FIXME
|
|
||||||
if [[ -n "$participant_arg" ]]; then
|
if [[ -n "$participant_arg" ]]; then
|
||||||
|
db_participants_endpoint=$(printf "$db_participants_endpoint_template" "$participant_arg")
|
||||||
|
participants_endpoint=$(db_query "$db_participants_endpoint")
|
||||||
|
|
||||||
db_participants_endpoint=$(printf "$db_conference_by_participant_id_template" "$participant_arg" "$from_time" "$until_time" "$participant_arg" "$from_time" "$until_time")
|
db_participants_conference=$(printf "$db_participants_conference_template" "$participant_arg")
|
||||||
mapfile -t participants_endpoint < <(db_query "$db_participants_endpoint")
|
participants_conference=$(db_query "$db_participants_conference")
|
||||||
|
|
||||||
db_participants_conference=$(printf "$db_participant_by_conference_id_template" "$participant_arg" "$from_time" "$until_time" "$participant_arg" "$from_time" "$until_time")
|
db_participants_statsid=$(printf "$db_participants_statsid_template" "$participant_arg")
|
||||||
mapfile -t participants_conference < <(db_query "$db_participants_conference")
|
participants_statsid=$(db_query "$db_participants_statsid")
|
||||||
|
|
||||||
db_participants_conference_name=$(printf "$db_participant_by_conference_name_template" "$participant_arg" "$from_time" "$until_time" "$participant_arg" "$from_time" "$until_time")
|
db_participants_ip=$(printf "$db_participants_ip_template" "$participant_arg")
|
||||||
mapfile -t participants_conference_name < <(db_query "$db_participants_conference_name")
|
participants_ip=$(db_query "$db_participants_ip")
|
||||||
|
|
||||||
db_participants_statsid=$(printf "$db_participant_by_stats_id_template" "$participant_arg" "$from_time" "$until_time" "$participant_arg" "$from_time" "$until_time")
|
if [[ -n $participants_endpoint ]]; then
|
||||||
mapfile -t participants_statsid < <(db_query "$db_participants_statsid")
|
db_participant=$(printf "$db_conference_by_participant_id_template" "$participant_arg" "$participant_arg")
|
||||||
|
mapfile -t conference_array < <(db_query "$db_participant")
|
||||||
db_participants_ip=$(printf "$db_participant_by_ip_template" "$participant_arg" "$from_time" "$until_time" "$participant_arg" "$from_time" "$until_time")
|
|
||||||
mapfile -t participants_ip < <(db_query "$db_participants_ip")
|
|
||||||
|
|
||||||
# match for participant endpoint_id
|
|
||||||
if [[ "${#participants_endpoint[@]}" -gt 0 ]]; then
|
|
||||||
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
header="\nParticipants with ID matching \"$IMPORTANT_TEXT$participant_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${participants_endpoint[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$IMPORTANT_TEXT$participant_id$NORMAL_TEXT\t$event_type\t$event_param\n"
|
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$IMPORTANT_TEXT$participant_id$NORMAL_TEXT\t$event_type\t$event_param\n"
|
||||||
done
|
done
|
||||||
|
@ -869,22 +661,13 @@ elif [[ "$participant_option" == true ]]; then
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# match for conference_id the participant was in
|
if [[ -n $participants_conference ]]; then
|
||||||
if [[ "${#participants_conference[@]}" -gt 0 ]]; then
|
db_participant=$(printf "$db_participant_by_conference_id_template" "$participant_arg" "$participant_arg")
|
||||||
|
mapfile -t conference_array < <(db_query "$db_participant")
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
header="\nParticipants in conferences with ID matching \"$IMPORTANT_TEXT$participant_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output+="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${participants_conference[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$IMPORTANT_TEXT$conference_id$NORMAL_TEXT\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
output+="$time\t$IMPORTANT_TEXT$conference_id$NORMAL_TEXT\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
||||||
done
|
done
|
||||||
|
@ -892,45 +675,13 @@ elif [[ "$participant_option" == true ]]; then
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# match for conference_name the participant was in
|
if [[ -n $participants_statsid ]]; then
|
||||||
if [[ "${#participants_conference_name[@]}" -gt 0 ]]; then
|
db_participant=$(printf "$db_participant_by_stats_id_template" "$participant_arg" "$participant_arg")
|
||||||
|
mapfile -t conference_array < <(db_query "$db_participant")
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
header="\nParticipants in conferences with name that include the string \"$IMPORTANT_TEXT$participant_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output+="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${participants_conference_name[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
|
||||||
output+="$time\t$conference_id\t$IMPORTANT_TEXT$conference_name$NORMAL_TEXT\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$event_param\n"
|
|
||||||
done
|
|
||||||
# output
|
|
||||||
echo -e "$output" | column -t -s $'\t'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# match for participant stats_id
|
|
||||||
if [[ "${#participants_statsid[@]}" -gt 0 ]]; then
|
|
||||||
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
header="\nParticipants with stats ID that include the string \"$IMPORTANT_TEXT$participant_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output+="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
|
||||||
for row in "${participants_statsid[@]}"; do
|
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$IMPORTANT_TEXT$event_param$NORMAL_TEXT\n"
|
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$IMPORTANT_TEXT$event_param$NORMAL_TEXT\n"
|
||||||
done
|
done
|
||||||
|
@ -938,22 +689,13 @@ elif [[ "$participant_option" == true ]]; then
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# match for participant IP
|
if [[ -n $participants_ip ]]; then
|
||||||
if [[ "${#participants_ip[@]}" -gt 0 ]]; then
|
db_participant=$(printf "$db_participant_by_ip_template" "$participant_arg" "$participant_arg")
|
||||||
|
mapfile -t conference_array < <(db_query "$db_participant")
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
header="\nParticipants with IP address matching \"$IMPORTANT_TEXT$participant_arg$NORMAL_TEXT\""
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output+="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${participants_ip[@]}"; do
|
for row in "${conference_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$IMPORTANT_TEXT$event_param$NORMAL_TEXT\n"
|
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$participant_id\t$event_type\t$IMPORTANT_TEXT$event_param$NORMAL_TEXT\n"
|
||||||
done
|
done
|
||||||
|
@ -963,24 +705,10 @@ elif [[ "$participant_option" == true ]]; then
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
db_participants_all=$(printf "$db_participants_all_template" )
|
||||||
# if no argument is given, we show all the participants
|
|
||||||
db_participants_all=$(printf "$db_participants_all_template" "$from_time" "$until_time")
|
|
||||||
mapfile -t participant_array < <(db_query "$db_participants_all")
|
mapfile -t participant_array < <(db_query "$db_participants_all")
|
||||||
|
|
||||||
# we only format the outrput if there are conferences to show
|
|
||||||
if [[ "${#participant_array[@]}" -gt 0 ]]; then
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
output="component\tparticipant ID\tconference ID\n"
|
||||||
header="\nAll participants"
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
header+=" for the time period \"$IMPORTANT_TEXT$from_time - $until_time$NORMAL_TEXT\""
|
|
||||||
fi
|
|
||||||
header+="\n"
|
|
||||||
echo -e "$header"
|
|
||||||
output+="component\tparticipant ID\tconference ID\n"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${participant_array[@]}"; do
|
for row in "${participant_array[@]}"; do
|
||||||
IFS='|' read -r jitsi_component endpoint_id conference_id <<< "$row"
|
IFS='|' read -r jitsi_component endpoint_id conference_id <<< "$row"
|
||||||
|
@ -988,108 +716,30 @@ elif [[ "$participant_option" == true ]]; then
|
||||||
done
|
done
|
||||||
# output
|
# output
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
else
|
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
echo -n "No participants found"
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
echo -n " for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
echo "."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
|
||||||
|
|
||||||
|
--time)
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
if [[ "$time_range_specified" == true ]]; then
|
||||||
|
echo "Events in the period $from_time - $until_time"
|
||||||
db_events_time=$(printf "$db_events_by_period_template" "$from_time" "$until_time" "$from_time" "$until_time")
|
db_events_time=$(printf "$db_events_by_period_template" "$from_time" "$until_time" "$from_time" "$until_time")
|
||||||
mapfile -t events_array < <(db_query "$db_events_time")
|
mapfile -t events_array < <(db_query "$db_events_time")
|
||||||
|
|
||||||
if [[ "${#events_array[@]}" -gt 0 ]]; then
|
|
||||||
output=""
|
|
||||||
# prepare the header
|
# prepare the header
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
header="\nEvents in the period \"$IMPORTANT_TEXT$from_time - $until_time$NORMAL_TEXT\"\n"
|
|
||||||
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
output="time\tconference ID\tconference name\tconference host\tloglevel\tparticipant ID\tevent\tparameter\n"
|
||||||
echo -e "$header"
|
|
||||||
fi
|
|
||||||
# prepare the formatted rows
|
# prepare the formatted rows
|
||||||
for row in "${events_array[@]}"; do
|
for row in "${events_array[@]}"; do
|
||||||
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
IFS='|' read -r time conference_id conference_name conference_host loglevel event_type participant_id event_param <<< "$row"
|
||||||
output+="$IMPORTANT_TEXT$time$NORMAL_TEXT\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$event_type\t$participant_id\t$event_param\n"
|
output+="$time\t$conference_id\t$conference_name\t$conference_host\t$loglevel\t$event_type\t$participant_id\t$event_param\n"
|
||||||
done
|
done
|
||||||
# output
|
# output
|
||||||
echo -e "$output" | column -t -s $'\t'
|
echo -e "$output" | column -t -s $'\t'
|
||||||
else
|
|
||||||
if [[ "$silent" != true ]]; then
|
|
||||||
echo -n "No events found"
|
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
|
||||||
echo -n " for the time period \"$from_time - $until_time\""
|
|
||||||
fi
|
|
||||||
echo "."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
fi
|
*)
|
||||||
|
echo -e "$help"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
255
log-regexps.md
255
log-regexps.md
|
@ -1,255 +0,0 @@
|
||||||
# Log regexps
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## JVB
|
|
||||||
|
|
||||||
### 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```
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z]+)\ conf_name=(.*)@([a-zA-Z0-9-_.]+)\ meeting_id=.*\]\ EndpointConnectionStatusMonitor\.start.*:\ Starting\ connection\ status\ monitor```
|
|
||||||
|
|
||||||
### 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.```
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire```
|
|
||||||
|
|
||||||
### 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```
|
|
||||||
|
|
||||||
### 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```
|
|
||||||
|
|
||||||
### 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\.```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## 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)
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\]\ JitsiMeetConferenceImpl\.joinTheRoom```
|
|
||||||
|
|
||||||
### participant joining
|
|
||||||
needed: *timestamp, loglevel, conferenceID, conferenceName, participantID, statsID*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.onMemberJoined.*:\ Member\ joined:([a-zA-Z0-9]+)\ stats-id=([a-zA-Z0-9-]+)```
|
|
||||||
|
|
||||||
### bridge selection
|
|
||||||
needed: *timestamp, loglevel, bridgeID*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*BridgeSelectionStrategy.select#.*:\ Selected.*\[jid=[a-z]@.*\/(.*),\ ```
|
|
||||||
|
|
||||||
### participant leaving
|
|
||||||
needed: *timestamp, loglevel, conferenceID, participantID*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=${conference_name}@.*\ meeting_id=${conference_id}\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+)```
|
|
||||||
|
|
||||||
### conference end
|
|
||||||
needed: *timestamp, loglevel, conferenceID*
|
|
||||||
|
|
||||||
regex
|
|
||||||
|
|
||||||
```Jicofo ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop```
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
This is a reference of the log lines and the corresponding regexps that are used in Jilo for events tracking.
|
||||||
|
|
||||||
|
Work in progress.
|
||||||
|
2024.06.10
|
||||||
|
|
||||||
|
|
||||||
|
JVB:
|
||||||
|
|
||||||
|
conference start:
|
||||||
|
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
|
||||||
|
regex
|
||||||
|
JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z]+)\ conf_name=(.*)@([a-zA-Z0-9-_.]+)\ meeting_id=.*\]\ EndpointConnectionStatusMonitor\.start.*:\ Starting\ connection\ status\ monitor
|
||||||
|
|
||||||
|
conference end:
|
||||||
|
log
|
||||||
|
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
|
||||||
|
|
||||||
|
participant joining
|
||||||
|
([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
|
||||||
|
|
||||||
|
pair selection
|
||||||
|
([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
|
||||||
|
|
||||||
|
participant leaving
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\.
|
||||||
|
|
||||||
|
|
||||||
|
## OLD
|
||||||
|
# was used to insert start & end in one db record,
|
||||||
|
# retired because in "start" regex there was no conference name, only id
|
||||||
|
##
|
||||||
|
|
||||||
|
conference start:
|
||||||
|
log
|
||||||
|
JVB 2024-04-01 03:02:52.593 INFO: [18962] Videobridge.createConference#255: create_conf, id=4c14584fce9a5970 meeting_id=177c43a3-1780-4258-aa23-ca3d7dd29aa5
|
||||||
|
regex
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\ Videobridge\.createConference#[0-9]+:\ create_conf,\ id=([a-zA-Z0-9]+)
|
||||||
|
|
||||||
|
conference end:
|
||||||
|
log
|
||||||
|
JVB 2024-04-01 03:04:24.339 INFO: [18981] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] Conference.expire#595: Expiring.
|
||||||
|
regex
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=([a-zA-Z0-9]+)\ .*conf_name=([^ ]+)@.*\]\ Conference\.expire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JICOFO:
|
||||||
|
|
||||||
|
conference start
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\]\ JitsiMeetConferenceImpl\.joinTheRoom
|
||||||
|
|
||||||
|
participant joining
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.onMemberJoined.*:\ Member\ joined:([a-zA-Z0-9]+)\ stats-id=([a-zA-Z0-9-]+)
|
||||||
|
|
||||||
|
bridge selection
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*BridgeSelectionStrategy.select#.*:\ Selected.*\[jid=[a-z]@.*\/(.*),\
|
||||||
|
|
||||||
|
participant leaving
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=${conference_name}@.*\ meeting_id=${conference_id}\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+)
|
||||||
|
|
||||||
|
conference end
|
||||||
|
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
mkdir -p deb-package
|
|
||||||
cd deb-package
|
|
||||||
mkdir -p "jilo-$VERSION/DEBIAN" "jilo-$VERSION/etc" "jilo-$VERSION/usr/bin" "jilo-$VERSION/usr/share/doc/jilo" "jilo-$VERSION/usr/share/man/man8"
|
|
||||||
|
|
||||||
cp ../deb-control "jilo-$VERSION/DEBIAN/control"
|
|
||||||
cp ../../jilo.conf "jilo-$VERSION/etc/jilo.conf"
|
|
||||||
cp ../../jilo "jilo-$VERSION/usr/bin/"
|
|
||||||
cp ../../jilo-cli "jilo-$VERSION/usr/bin/"
|
|
||||||
cp ../../CHANGELOG.md "jilo-$VERSION/usr/share/doc/jilo/"
|
|
||||||
cp ../../LICENSE "jilo-$VERSION/usr/share/doc/jilo/"
|
|
||||||
cp ../../README.md "jilo-$VERSION/usr/share/doc/jilo/"
|
|
||||||
cp ../../TODO.md "jilo-$VERSION/usr/share/doc/jilo/"
|
|
||||||
cp ../../log-regexps.md "jilo-$VERSION/usr/share/doc/jilo/"
|
|
||||||
cp ../man-jilo.8 "jilo-$VERSION/usr/share/man/man8/jilo.8"
|
|
||||||
|
|
||||||
dpkg-deb --build "jilo-$VERSION"
|
|
||||||
|
|
||||||
rm -rf "jilo-$VERSION/"
|
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
RELEASE=1
|
|
||||||
|
|
||||||
mkdir -p rpm-package/SOURCES rpm-package/SPECS
|
|
||||||
cd rpm-package
|
|
||||||
|
|
||||||
PACKAGE_DIR="jilo-$VERSION"
|
|
||||||
|
|
||||||
mkdir -p "$PACKAGE_DIR"
|
|
||||||
|
|
||||||
cp ../../jilo.conf "$PACKAGE_DIR/"
|
|
||||||
cp ../../jilo "$PACKAGE_DIR/"
|
|
||||||
cp ../../jilo-cli "$PACKAGE_DIR/"
|
|
||||||
cp ../../CHANGELOG.md "$PACKAGE_DIR/"
|
|
||||||
cp ../../LICENSE "$PACKAGE_DIR/"
|
|
||||||
cp ../../README.md "$PACKAGE_DIR/"
|
|
||||||
cp ../../TODO.md "$PACKAGE_DIR/"
|
|
||||||
cp ../../log-regexps.md "$PACKAGE_DIR/"
|
|
||||||
cp ../man-jilo.8 "$PACKAGE_DIR/"
|
|
||||||
cp ../rpm-jilo.spec SPECS/jilo.spec
|
|
||||||
|
|
||||||
tar -czf "jilo-$VERSION.tar.gz" "$PACKAGE_DIR"
|
|
||||||
mv "jilo-$VERSION.tar.gz" SOURCES/
|
|
||||||
|
|
||||||
rpmbuild --define "_topdir $(pwd)" --define "VERSION $VERSION" --define "RELEASE $RELEASE" -ba SPECS/jilo.spec
|
|
||||||
|
|
||||||
rm -rf "$PACKAGE_DIR"
|
|
|
@ -1,11 +0,0 @@
|
||||||
Package: jilo
|
|
||||||
Version: 0.1.1
|
|
||||||
Section: utils
|
|
||||||
Priority: optional
|
|
||||||
Architecture: all
|
|
||||||
Maintainer: Yasen Pramatarov <yasen@lindeas.com>
|
|
||||||
Description: Jitsi logs observer
|
|
||||||
Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
|
||||||
This package contains the 'jilo' logs collecting tool and 'jilo-cli' command line events searching tool.
|
|
||||||
Homepage: https://lindeas.com/jilo
|
|
||||||
Depends: bash, sqlite3 | mysql-client | mariadb-client, coreutils, util-linux
|
|
|
@ -1,59 +0,0 @@
|
||||||
.TH JILO "8" "June 2024" "jilo 0.1.1"
|
|
||||||
.SH NAME
|
|
||||||
jilo \- Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B jilo
|
|
||||||
[\fIoptions\fR]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B jilo
|
|
||||||
is a bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
|
||||||
|
|
||||||
This is the logs collecting tool ('jilo'). If you want to search through an already populated databae, use the command line tool 'jilo-cli'.
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
.B \-d, \-\-create\-db
|
|
||||||
Create (or recreate) the database.
|
|
||||||
.TP
|
|
||||||
.B \-f, \-\-flush
|
|
||||||
Flush an existing database.
|
|
||||||
.TP
|
|
||||||
.B \-c, \-\-check
|
|
||||||
Check the consistency of the database and the status of the log files.
|
|
||||||
.TP
|
|
||||||
.B \-p, \-\-parse
|
|
||||||
Parse the log file(s) and enter the data found in the database.
|
|
||||||
.TP
|
|
||||||
.B \-v, \-\-verbose
|
|
||||||
Verbose mode with more details shown. Can be used together with \-c, \-p
|
|
||||||
.TP
|
|
||||||
.B \-h, \-\-help
|
|
||||||
Display help message.
|
|
||||||
.TP
|
|
||||||
.B \-V, \-\-version
|
|
||||||
Display version information.
|
|
||||||
|
|
||||||
.SH EXAMPLES
|
|
||||||
Create the database, as configured in jilo.conf (or use the defaults). If the database already exists, it drops it and recreates it:
|
|
||||||
.B jilo -d
|
|
||||||
|
|
||||||
Check the consistency of the database and show detils about the logs:
|
|
||||||
.B jilo -c -v
|
|
||||||
|
|
||||||
Parse the logs in verbose mode, with progress indication:
|
|
||||||
.B jilo -p -v
|
|
||||||
|
|
||||||
.SH CONFIGURATION
|
|
||||||
The configuration file is /etc/jilo.conf.
|
|
||||||
|
|
||||||
.SH AUTHOR
|
|
||||||
Written and maintained by Yasen Pramatarov <yasen@lindeas.com>
|
|
||||||
|
|
||||||
.SH HOMEPAGE
|
|
||||||
https://lindeas.com/jilo
|
|
||||||
|
|
||||||
.SH VERSION
|
|
||||||
0.1.1
|
|
||||||
|
|
||||||
.SH SEE ALSO
|
|
||||||
jilo-cli(8)
|
|
|
@ -1,57 +0,0 @@
|
||||||
Name: jilo
|
|
||||||
Version: 0.1.1
|
|
||||||
Release: 1%{?dist}
|
|
||||||
Summary: Jitsi logs observer
|
|
||||||
|
|
||||||
License: GPLv2
|
|
||||||
URL: https://lindeas.com/jilo
|
|
||||||
Source0: %{name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
%define sourcedir %{_builddir}/%{name}-%{version}
|
|
||||||
|
|
||||||
BuildArch: noarch
|
|
||||||
BuildRequires: bash
|
|
||||||
Requires: bash
|
|
||||||
Requires: (sqlite or mysql or mariadb)
|
|
||||||
Requires: coreutils
|
|
||||||
Requires: util-linux
|
|
||||||
|
|
||||||
%description
|
|
||||||
Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
|
|
||||||
This package contains the 'jilo' logs collecting tool and 'jilo-cli' command line events searching tool.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%install
|
|
||||||
# directories
|
|
||||||
mkdir -p %{buildroot}/etc
|
|
||||||
mkdir -p %{buildroot}/usr/bin
|
|
||||||
mkdir -p %{buildroot}/usr/share/doc/%{name}
|
|
||||||
mkdir -p %{buildroot}/usr/share/man/man8
|
|
||||||
|
|
||||||
# then copy the files
|
|
||||||
cp %{sourcedir}/jilo.conf %{buildroot}/etc/jilo.conf
|
|
||||||
cp %{sourcedir}/jilo %{buildroot}/usr/bin/
|
|
||||||
cp %{sourcedir}/jilo-cli %{buildroot}/usr/bin/
|
|
||||||
cp %{sourcedir}/CHANGELOG.md %{buildroot}/usr/share/doc/%{name}/
|
|
||||||
cp %{sourcedir}/LICENSE %{buildroot}/usr/share/doc/%{name}/
|
|
||||||
cp %{sourcedir}/README.md %{buildroot}/usr/share/doc/%{name}/
|
|
||||||
cp %{sourcedir}/TODO.md %{buildroot}/usr/share/doc/%{name}/
|
|
||||||
cp %{sourcedir}/log-regexps.md %{buildroot}/usr/share/doc/%{name}/
|
|
||||||
cp %{sourcedir}/man-jilo.8 %{buildroot}/usr/share/man/man8/jilo.8
|
|
||||||
|
|
||||||
%files
|
|
||||||
/etc/jilo.conf
|
|
||||||
/usr/bin/jilo
|
|
||||||
/usr/bin/jilo-cli
|
|
||||||
/usr/share/doc/%{name}/CHANGELOG.md
|
|
||||||
/usr/share/doc/%{name}/LICENSE
|
|
||||||
/usr/share/doc/%{name}/README.md
|
|
||||||
/usr/share/doc/%{name}/TODO.md
|
|
||||||
/usr/share/doc/%{name}/log-regexps.md
|
|
||||||
/usr/share/man/man8/jilo.8.gz
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Wed Jun 12 2024 Yasen Pramatarov <yasen@lindeas.com> 0.1.1
|
|
||||||
- Initial build
|
|
Loading…
Reference in New Issue