Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 95 of 807  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  68228   Wed Jan 13 17:04:34 2016 Reply Tamas Galtgal@km3net.deQuestionLinuxELOG V3.1.0-241Re: Monitoring a logbook for changes

I just noticed that there are multiple messages per file, so I have to adapt the parser. I'll update this thread when I'm done!

Johan Forsberg wrote:

Yeah, I suppose something like that would be both faster and more efficient than polling ELOG itself. Fortunately the ELOG disk format looks easily parsed.

Thanks for the pointer!

Tamas Gal wrote:

I recommend monitoring directly on the server. Here is an example of a very simply Python script (https://github.com/tamasgal/elog-slack) which monitors the files very efficiently and immediately pushes notifications to Slack (slack.com). Just look at the code, it's pretty straight forward and very easy to adapt it to other (web) services.

Btw. here is an ELOG entry of it https://midas.psi.ch/elogs/Forum/68224

Johan Forsberg wrote:

Hi again!

I've another need that you probably already thought of :)

I'd like to be able to efficiently monitor a logbook for changes (new or edited posts) somehow. The most reasonable way I've found so far is to periodically poll a search that looks for posts after the time of the last poll. But that might note be very efficient, especially if the polling period gets short (or number of clients grows).

Is there some other feature that could be used for this? I was thinking maybe the ETag or Last-Modified HTTP header field could be used to show changes to a logbook by just reading the headers, but it would also require HEAD request support which does not seem to be there.

Cheers,

Johan

 

 

 

  68230   Wed Jan 13 18:37:32 2016 Reply Tamas Galtgal@km3net.deQuestionLinuxELOG V3.1.0-241Re: Monitoring a logbook for changes

Where is this feature documented?

Stefan Ritt wrote:

You guys know that there is the possibility to execute an arbitrary script on each submission of a new messge? Just use "Execute new = <script>". In the script you have access to all parameters of the message. That's maybe simple than to watch the file set.

 

  68232   Wed Jan 13 19:13:47 2016 Reply Tamas Galtgal@km3net.deQuestionLinuxELOG V3.1.0-241Re: Monitoring a logbook for changes

I'm probably too tired or I don't know, but of course I looked at the user's guide and the admin's guide but did not found anything about this ;-) Is there another documention which I missed somehow?

Stefan Ritt wrote:

In the documentation of course :-)

Tamas Gal wrote:

Where is this feature documented?

Stefan Ritt wrote:

You guys know that there is the possibility to execute an arbitrary script on each submission of a new messge? Just use "Execute new = <script>". In the script you have access to all parameters of the message. That's maybe simple than to watch the file set.

 

 

 

  68234   Wed Jan 13 19:26:35 2016 Reply Tamas Galtgal@km3net.deQuestionLinuxELOG V3.1.0-241Re: Monitoring a logbook for changes

OK thanks I'll check that out. I did not configure ELOG by myself, I only use it and wrote the Slack plugin ;-)

Stefan Ritt wrote:

You look here: http://midas.psi.ch/elog/config.html and scroll down to "Execute New". I wonder how you ever could run elog without looking at that page.

Tamas Gal wrote:

I'm probably too tired or I don't know, but of course I looked at the user's guide and the admin's guide but did not found anything about this ;-) Is there another documention which I missed somehow?

Stefan Ritt wrote:

In the documentation of course :-)

Tamas Gal wrote:

Where is this feature documented?

Stefan Ritt wrote:

You guys know that there is the possibility to execute an arbitrary script on each submission of a new messge? Just use "Execute new = <script>". In the script you have access to all parameters of the message. That's maybe simple than to watch the file set.

 

 

 

 

 

  69542   Tue Jul 19 11:01:00 2022 Question Tamas Galtgal@km3net.deQuestionLinux3.1.3Too many redirects when running behind load balancer?

We were running ELOG for many many years in our experiments and the instance was operated on a Debian XEN server as a container. I am now trying to migrate it into our Docker Swarm cluster and I am using the https://hub.docker.com/r/de1lz/elog-docker Docker image, which works very well with our logbooks when I run it as a single container. However, when I put the container behind my load balancer (HAProxy) using the simple HTTP mode (which works very well for all the other HTTP-based services) with this simple configuration:

backend be_elog.km3net.de
    mode http
    server-template km3net-elog- 1 km3net-elog_elog:8080 check resolvers docker init-addr libc,none

I get a "too many redirects" error when I try to access one of the logbooks. The starting page works fine, but every other link leads to a pile-up of redirects.

Here is the current instance running, where you can see the behaviour: https://elog.test.km3net.de (all log entries deleted and only two logbooks activated)

My question is: what kind of redirect could go wrong here? I don't know how the internal HTTP server of ELOG works, but maybe someone faced similar issues.

My ELOG configuration is also pretty basic, and as I wrote above, everything works when I run it without the load balancer (single instance at the moment). Here is the top part of the configuration, it contains a few dozens of logbooks but they are configured the very same way. 

;User Settings
;=============
Password file = login.xml
Admin user = km3net_admin
Self register = 0
Allow password change = 0
Allow config = km3net_admin

;Group Settings:
;====
Group ELOGKM3NET = Operations IT, Operations FR

[Operations IT]
Subdir = Operations_IT
Theme = default
Default encoding = 0
Comment = KM3NeT IT Detector Operations
Attributes = Author, Type, Subject
Options Author = A, B, C
Options Type = PPM-DOM, PPM-DU, Comment, Power cut, New run
Extendable Options = Type
Required Attributes = Author, Type, Subject
Page Title = ELOG - $subject
;Sort Attributes = Author, Type
Quick filter = Date, Type, Author
Resubmit default = 2
Reverse sort = 1
Menu commands = List, New, Edit, Reply, Duplicate, Find, Config, Help, Logout
Preset on first reply Subject = Re: $Subject
Preset on reply author =

 

  69544   Tue Jul 19 11:17:44 2022 Reply Tamas Galtgal@km3net.deQuestionLinux3.1.3Re: Too many redirects when running behind load balancer?

Thanks for the quick reply! Sorry, I forgot to paste the "global" part of the config, I have that URL already set:

[global]
;Main Settings
;=============
Usr = elog
Grp = elog
port = 8080
SSL = 0
URL = https://elog.test.km3net.de
Title image = <img border=0 src="KM3NeT_logo.png" alt="KM3NeT logo" height="35px">
;SMTP host = smtp.fau.de
Display mode = summary
Thumbnail size = 500>
List Menu text = clock.html
Menu text = clock.html

Stefan Ritt wrote:

Probably you need a setting

URL = https://elog.test.km3net.de

or so in your elogd.cfg file.

Stefan

 

  69545   Tue Jul 19 11:24:36 2022 Reply Tamas Galtgal@km3net.deQuestionLinux3.1.3Re: Too many redirects when running behind load balancer?

I also tried the default configuration (example config) and it that works behind the load balancer. So I guess it's related to the password-page, which causes this redirect loop? Our logbooks are all password protected, so when a logbook URL is clicked, it should first present the login-form, and that's where it chokes.

  69547   Tue Jul 19 12:36:04 2022 Reply Tamas Galtgal@km3net.deQuestionLinux3.1.3Re: Too many redirects when running behind load balancer?

My problem is that I don't even reach the page where I can enter a password. If you go to https://elog.test.km3net.de and click on a logbook, you'll see that it immediately goes into a redirect loop. I already logged the routing but there is nothing else...

Stefan Ritt wrote:

Yeah, after you enter a password, elog redirects to what it finds in "URL". You can trace that by opening "development tools" in Google Chrome, go to "network" and watch packets going back and forth. I never worked with the load balancer, but maybe you need a different "URL" containing a '/' at the end?

Tamas Gal wrote:

I also tried the default configuration (example config) and it that works behind the load balancer. So I guess it's related to the password-page, which causes this redirect loop? Our logbooks are all password protected, so when a logbook URL is clicked, it should first present the login-form, and that's where it chokes.

 

 

ELOG V3.1.5-3fb85fa6