Log Based Monitoring Approach

Can you share the script with us?

Of course. I’ve opened a new topic in this forum’s “Install & Config” section:

This does not seems to be working… has something been changed or am I missing something?

After cloning the repo sucessfully, when I type (with sudo): main -s meet.mydomain.com

it gives me an error:

Command ‘main’ not found, did you mean:

command ‘moin’ from deb python-moinmoin
command ‘maim’ from deb maim
command ‘cain’ from deb cain
command ‘mail’ from deb mailutils
command ‘amin’ from deb orville-write
command ‘rain’ from deb bsdgames
command ‘man’ from deb man-db

Try: apt install

I am relatively new to unix, so if you see any mistake at my end, pls feel free to point it out.

Many Thanks,

Nothing has been changed and all updates will be pushed to the development branch so the master branch is still the same it was 2 weeks ago.

I think what you should try first is to execute the main command as ./main instead of main. This is the way you execute programs/scripts from a Unix shell if you want to execute them from the same folder.

If you just type main it will look for the main script in your $PATH variable. If you want to see what folder are part of your $PATH variable (a list) you can type: echo $PATH and you can see where your shell searches for programs (usually /usr/bin or something like that. It is possible to add the main script to your global path but I would recommend against it and instead just navigate to the repo folder and execute from there.

Edit: I checked the Gitlab repo and have changed the lines in the README.md to include ./main instead of main to make things more clear.

I can confirm that it works as expected. Thanks!

Thanks for the prompt reply. I think this is the only group/forum in Jitsi community which is so prompt and resposnive - most of the jitsi groups are not so good (I am trying to be nice on the internet). :slight_smile:

Just so you know, I tried the command that you suggested and it DID work perfectly fine. Thanks a lot for taking out the time to make the necessary changes - really appreciate it.

However, may I ask a very basic question (which I believe someone has already asked) - can we modify the script to ask for a date range and then based on the input it can show how many meetings were held within that period and show the name of the room or user name. It will be better if we can capture the start&end time or just the duration of each meeting.

What do you think? Is it too much to ask for? Is there no point in making such script?

Many Thanks,

Good to hear you got it working!

And yes I’m working on implementing certain additional functionalities, I’m keeping track of them in the issues on the Gitlab project. Once finished I will push these updates to the development branch of the project. The thing is that I’m doing this as a little side project, and I have another big project I’m currently working on that requires my full attention. I have recently updated and cleaned up the logsnatch script, to make it a lot more efficient, this is already in the development branch. My next move will be to update the jitsihawk script. Currently there are the following changes planned:

  • ignore log files based on server restarts
  • use a config file for the regular expressions (separate the script logic from the log search queries) to make it easier for users to make changes in case the log file formatting changes
  • provide full host (authorized user) array per room instead of last host joined
  • work on the log analysis within time windows (perhaps using execution flags as well), if you have additional suggestions please message me and I’ll consider them
  • look into providing docker support using execution flag on main
  • clean up the code and documentation to make it more readable (and maintainable)

I’ll post to this thread on updates!

Hello @Magic_V,

Congratulations on this simple, yet effective solution!
I did not have the time to read through all the code, but I want to fix a little something… Maybe you will beat me to it! :stuck_out_tongue:

There is something unpleasant about the repainting of the list… It seems to be clearing the screen and relisting… Maybe there is a way to just update what is on screen? Like “atop” does… Or maybe the data is not buffered in RAM before “repainting” the screen and it appears too slow, making a weird flickering… I don’t know! Maybe you have an idea!

Also, I don’t think that having the last Host is useful
I would parse the name of the first host to have joined the room as it is probably the meeting’s host…

And also, it would be great if the first line gave the total number of participants after the total number of rooms… just a thought…

What do you think?

Works like a charm. Made a jitsi directory (sudo ssh) and made a subdirecroty lib. Put main script in jitsi. Put jitsihawk and logsnatch in jitsi/lib. I did chmod for main, jitsihawh and logsnatch to 755. I can now ssh into my server and see what is going on without needing to be root, but will need to be root to change anything.

Well, I didn’t consider the jicofo files in /var/lib being not readable to user. Still have to use sudo to run main.

quick question -

do we need to run the script on Jicofo instance ?

Yes, it uses the jicofo logs to gather data


was wondering some how to capture that log data in grafana … any ideas ?

something like https://github.com/engesin/Jitsi-Prometheus-Exporter or many others if you use prometheus. should be exists for influxdb too

Dear, the script is working perfectly. But I see that I have open rooms with active participants. If I enter one of those rooms, a participant will join me. If I leave, the room continues to have 8 participants for example.
Where could I erase these rooms?
Restarting the services, they are still there.

I ran into similar issues… You need to clear the following logs:
Beware, this if there are rooms opened, you will loose them in the log but people will still be in them…
Do it when no one is on your server, or close jicofo first.

First, stop the logging script

Clear these logs:

/var/log/jitsi/jicofo.log (and anything with numbers)

Here, delete the content, not the file!

[path to your jitsihawk folder]/lib/jicofo.log.total.previous
[path to your jitsihawk folder]/lib/jicofo.log.total

From time to time, I had to restart jicofo too.

Restart the logging script