public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Redirect Apache status requests
@ 2026-06-22 14:15 Peer Dietzmann
  2026-06-22 14:20 ` Peer Dietzmann
  0 siblings, 1 reply; 9+ messages in thread
From: Peer Dietzmann @ 2026-06-22 14:15 UTC (permalink / raw)
  To: development, dietzmann

Redirect requests to Apache's status to it's backend, force local requests.
This is required to allow Observium's agent to pull metrics from Apache.

Best,
Peer

Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
---
 config/httpd/httpd.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
index c694bffe2..09b10b50f 100644
--- a/config/httpd/httpd.conf
+++ b/config/httpd/httpd.conf
@@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
 # Virtual server configuration
 Include /etc/httpd/conf/vhosts.d/*.conf
 
+# Allow local clients to pull Apache's status
+<Location /server-status>
+    SetHandler server-status
+    Require local
+</Location>
+
 # EOF
-- 
2.43.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 14:15 [PATCH 2/2] Redirect Apache status requests Peer Dietzmann
@ 2026-06-22 14:20 ` Peer Dietzmann
  2026-06-22 14:59   ` Matthias Fischer
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Peer Dietzmann @ 2026-06-22 14:20 UTC (permalink / raw)
  To: development; +Cc: Peer Dietzmann

Hello,

there is also another patch required to make the module working. But I 
just can't find the file in the repository that needs to be changed:

Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be 
changed to:

         close INFILE;
} else {
         # grab the status URL (fresh data)
         @data = split /(\n)/, LWP::Simple::get( 
'http://localhost:81/server-status?auto' )
                 or die "Data fetch failure.\n";

         # write file

The *localhost* has to be changed to *localhost:81*

The concerned bug that should be fixed through those three patches is: 
https://bugzilla.ipfire.org/show_bug.cgi?id=14017

Best,

Peer

On 22/06/2026 16:15, Peer Dietzmann wrote:
> Redirect requests to Apache's status to it's backend, force local requests.
> This is required to allow Observium's agent to pull metrics from Apache.
>
> Best,
> Peer
>
> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
> ---
>   config/httpd/httpd.conf | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
> index c694bffe2..09b10b50f 100644
> --- a/config/httpd/httpd.conf
> +++ b/config/httpd/httpd.conf
> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>   # Virtual server configuration
>   Include /etc/httpd/conf/vhosts.d/*.conf
>   
> +# Allow local clients to pull Apache's status
> +<Location /server-status>
> +    SetHandler server-status
> +    Require local
> +</Location>
> +
>   # EOF

-- 
Mit freundlichem Gruß
Peer Dietzmann

Brecht-IT  | Administration und Support



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 14:20 ` Peer Dietzmann
@ 2026-06-22 14:59   ` Matthias Fischer
  2026-06-22 15:07   ` Matthias Fischer
  2026-06-22 17:18   ` Matthias Fischer
  2 siblings, 0 replies; 9+ messages in thread
From: Matthias Fischer @ 2026-06-22 14:59 UTC (permalink / raw)
  To: development; +Cc: dietzmann

[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]

On 22.06.2026 16:20, Peer Dietzmann wrote:
> Hello,

Hi,
> there is also another patch required to make the module working. But I 
> just can't find the file in the repository that needs to be changed:

You won't find this file in the repository - that would be too easy. ;-)

This 'apache'-file is stored in the observium archive
(observium/scripts/agent-local/apache). And only there. It is extracted
during the build phase, and is then immediately deleted. This is
controlled via the lfs file:

Line 83 (to be sure: first delete and then unpack source):
...
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
...

Line 103 (clean up):
...
@rm -rf $(DIR_APP)
...

IMHO the best way to apply your changes would be a patchfile (see
attachment) which needs to be copied into the repository in the
directory '/src/patches/observium', e.g.).

Then the lfs file needs something like this in a new line *84*:
...
cd $(DIR_APP) && patch -Np1 <
$(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
...
HTH
Matthias

> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be 
> changed to:
> 
>          close INFILE;
> } else {
>          # grab the status URL (fresh data)
>          @data = split /(\n)/, LWP::Simple::get( 
> 'http://localhost:81/server-status?auto' )
>                  or die "Data fetch failure.\n";
> 
>          # write file
> 
> The *localhost* has to be changed to *localhost:81*
> 
> The concerned bug that should be fixed through those three patches is: 
> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
> 
> Best,
> 
> Peer
> 
> On 22/06/2026 16:15, Peer Dietzmann wrote:
>> Redirect requests to Apache's status to it's backend, force local requests.
>> This is required to allow Observium's agent to pull metrics from Apache.
>>
>> Best,
>> Peer
>>
>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>> ---
>>   config/httpd/httpd.conf | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>> index c694bffe2..09b10b50f 100644
>> --- a/config/httpd/httpd.conf
>> +++ b/config/httpd/httpd.conf
>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>   # Virtual server configuration
>>   Include /etc/httpd/conf/vhosts.d/*.conf
>>   
>> +# Allow local clients to pull Apache's status
>> +<Location /server-status>
>> +    SetHandler server-status
>> +    Require local
>> +</Location>
>> +
>>   # EOF
> 

[-- Attachment #2: 01_redirect_apache_localhost_to_port_81.patch --]
[-- Type: text/plain, Size: 496 bytes --]

--- a/observium/scripts/agent-local/apache	Sun Oct  4 07:21:06 2015
+++ b/observium/scripts/agent-local/apache	Mon Jun 22 16:36:40 2026
@@ -26,7 +26,7 @@
         close INFILE;
 } else {
         # grab the status URL (fresh data)
-        @data = split /(\n)/, LWP::Simple::get( 'http://localhost/server-status?auto' )
+        @data = split /(\n)/, LWP::Simple::get( 'http://localhost:81/server-status?auto' )
                 or die "Data fetch failure.\n";
 
         # write file

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 14:20 ` Peer Dietzmann
  2026-06-22 14:59   ` Matthias Fischer
@ 2026-06-22 15:07   ` Matthias Fischer
  2026-06-22 17:18   ` Matthias Fischer
  2 siblings, 0 replies; 9+ messages in thread
From: Matthias Fischer @ 2026-06-22 15:07 UTC (permalink / raw)
  To: development; +Cc: dietzmann

[-- Attachment #1: Type: text/plain, Size: 2597 bytes --]

*Second try with attachment in unix format (line breaks)!*

##########################################################

On 22.06.2026 16:20, Peer Dietzmann wrote:
> Hello,

Hi,
> there is also another patch required to make the module working. But I 
> just can't find the file in the repository that needs to be changed:

You won't find this file in the repository - that would be too easy. ;-)

This 'apache'-file is stored in the observium archive
(observium/scripts/agent-local/apache). And only there. It is extracted
during the build phase, and is then immediately deleted. This is
controlled via the lfs file:

Line 83 (to be sure: first delete and then unpack source):
...
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
...

Line 103 (clean up):
...
@rm -rf $(DIR_APP)
...

IMHO the best way to apply your changes would be a patchfile (see
attachment) which needs to be copied into the repository in the
directory '/src/patches/observium', e.g.).

Then the lfs file needs something like this in a new line *84*:
...
cd $(DIR_APP) && patch -Np1 <
$(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
...
HTH
Matthias

> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be 
> changed to:
> 
>          close INFILE;
> } else {
>          # grab the status URL (fresh data)
>          @data = split /(\n)/, LWP::Simple::get( 
> 'http://localhost:81/server-status?auto' )
>                  or die "Data fetch failure.\n";
> 
>          # write file
> 
> The *localhost* has to be changed to *localhost:81*
> 
> The concerned bug that should be fixed through those three patches is: 
> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
> 
> Best,
> 
> Peer
> 
> On 22/06/2026 16:15, Peer Dietzmann wrote:
>> Redirect requests to Apache's status to it's backend, force local requests.
>> This is required to allow Observium's agent to pull metrics from Apache.
>>
>> Best,
>> Peer
>>
>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>> ---
>>   config/httpd/httpd.conf | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>> index c694bffe2..09b10b50f 100644
>> --- a/config/httpd/httpd.conf
>> +++ b/config/httpd/httpd.conf
>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>   # Virtual server configuration
>>   Include /etc/httpd/conf/vhosts.d/*.conf
>>   
>> +# Allow local clients to pull Apache's status
>> +<Location /server-status>
>> +    SetHandler server-status
>> +    Require local
>> +</Location>
>> +
>>   # EOF
> 

[-- Attachment #2: 01_redirect_apache_localhost_to_port_81.patch --]
[-- Type: text/plain, Size: 485 bytes --]

--- a/observium/scripts/agent-local/apache	Sun Oct  4 07:21:06 2015
+++ b/observium/scripts/agent-local/apache	Mon Jun 22 16:36:40 2026
@@ -26,7 +26,7 @@
         close INFILE;
 } else {
         # grab the status URL (fresh data)
-        @data = split /(\n)/, LWP::Simple::get( 'http://localhost/server-status?auto' )
+        @data = split /(\n)/, LWP::Simple::get( 'http://localhost:81/server-status?auto' )
                 or die "Data fetch failure.\n";
 
         # write file

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 14:20 ` Peer Dietzmann
  2026-06-22 14:59   ` Matthias Fischer
  2026-06-22 15:07   ` Matthias Fischer
@ 2026-06-22 17:18   ` Matthias Fischer
  2026-06-22 20:42     ` Peer Dietzmann
  2 siblings, 1 reply; 9+ messages in thread
From: Matthias Fischer @ 2026-06-22 17:18 UTC (permalink / raw)
  To: development; +Cc: dietzmann

[-- Attachment #1: Type: text/plain, Size: 2895 bytes --]

*Third try - fixed typo in patch line*

- "-Np1" should have been "-Np2".

Without the quotes, of course.

Sorry...its too warm and the observium-lfs has a different path variable
(DIR_APP) than others. I put both files in attachments.

##########################################################

*Second try with attachment in unix format (line breaks)!*

##########################################################

On 22.06.2026 16:20, Peer Dietzmann wrote:
> Hello,

Hi,

> there is also another patch required to make the module working. But I 
> just can't find the file in the repository that needs to be changed:

You won't find this file in the repository - that would be too easy. ;-)

This 'apache'-file is stored in the observium archive
(observium/scripts/agent-local/apache). And only there. It is extracted
during the build phase, and is then immediately deleted. This is
controlled via the lfs file:

Line 83 (to be sure: first delete and then unpack source):
...
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
...

Line 103 (clean up):
...
@rm -rf $(DIR_APP)
...

IMHO the best way to apply your changes would be a patchfile (see
attachment) which needs to be copied into the repository in the
directory '/src/patches/observium', e.g.).

Then the lfs file needs something like this in a new line *84*:
...
cd $(DIR_APP) && patch -Np2 <
$(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
...
HTH
Matthias

> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be 
> changed to:
> 
>          close INFILE;
> } else {
>          # grab the status URL (fresh data)
>          @data = split /(\n)/, LWP::Simple::get( 
> 'http://localhost:81/server-status?auto' )
>                  or die "Data fetch failure.\n";
> 
>          # write file
> 
> The *localhost* has to be changed to *localhost:81*
> 
> The concerned bug that should be fixed through those three patches is: 
> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
> 
> Best,
> 
> Peer
> 
> On 22/06/2026 16:15, Peer Dietzmann wrote:
>> Redirect requests to Apache's status to it's backend, force local requests.
>> This is required to allow Observium's agent to pull metrics from Apache.
>>
>> Best,
>> Peer
>>
>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>> ---
>>   config/httpd/httpd.conf | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>> index c694bffe2..09b10b50f 100644
>> --- a/config/httpd/httpd.conf
>> +++ b/config/httpd/httpd.conf
>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>   # Virtual server configuration
>>   Include /etc/httpd/conf/vhosts.d/*.conf
>>   
>> +# Allow local clients to pull Apache's status
>> +<Location /server-status>
>> +    SetHandler server-status
>> +    Require local
>> +</Location>
>> +
>>   # EOF
> 

[-- Attachment #2: 01_redirect_apache_localhost_to_port_81.patch --]
[-- Type: text/plain, Size: 485 bytes --]

--- a/observium/scripts/agent-local/apache	Sun Oct  4 07:21:06 2015
+++ b/observium/scripts/agent-local/apache	Mon Jun 22 16:36:40 2026
@@ -26,7 +26,7 @@
         close INFILE;
 } else {
         # grab the status URL (fresh data)
-        @data = split /(\n)/, LWP::Simple::get( 'http://localhost/server-status?auto' )
+        @data = split /(\n)/, LWP::Simple::get( 'http://localhost:81/server-status?auto' )
                 or die "Data fetch failure.\n";
 
         # write file

[-- Attachment #3: lfs - observium-agent --]
[-- Type: text/plain, Size: 4066 bytes --]

###############################################################################
#                                                                             #
# IPFire.org - A linux based firewall                                         #
# Copyright (C) 2007-2026  IPFire Team  <info@ipfire.org>                     #
#                                                                             #
# This program is free software: you can redistribute it and/or modify        #
# it under the terms of the GNU General Public License as published by        #
# the Free Software Foundation, either version 3 of the License, or           #
# (at your option) any later version.                                         #
#                                                                             #
# This program is distributed in the hope that it will be useful,             #
# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

###############################################################################
# Definitions
###############################################################################

include Config

SUMMARY    = Observium agent

VER        = 24.4

THISAPP    = observium-community-$(VER)
DL_FILE    = $(THISAPP).tar.gz
DL_FROM    = $(URL_IPFIRE)
DIR_APP    = $(DIR_SRC)/observium
TARGET     = $(DIR_INFO)/$(THISAPP)
PROG       = observium-agent
PAK_VER    = 5

DEPS       = xinetd perl-Encode-Locale

SERVICES   =

###############################################################################
# Top-level Rules
###############################################################################

objects = $(DL_FILE)

$(DL_FILE) = $(DL_FROM)/$(DL_FILE)

$(DL_FILE)_BLAKE2 = 1ef34e7bb6ce43ea7e0a122deb5031d555d942d4f79be0596fc0e2c63a2f92321aa22f34a21e6fa559a8a76e744770f9d74676955acdd76dc4d410e1107636a2

install : $(TARGET)

check : $(patsubst %,$(DIR_CHK)/%,$(objects))

download :$(patsubst %,$(DIR_DL)/%,$(objects))

b2 : $(subst %,%_BLAKE2,$(objects))

dist:
	@$(PAK)

###############################################################################
# Downloading, checking, b2sum
###############################################################################

$(patsubst %,$(DIR_CHK)/%,$(objects)) :
	@$(CHECK)

$(patsubst %,$(DIR_DL)/%,$(objects)) :
	@$(LOAD)

$(subst %,%_BLAKE2,$(objects)) :
	@$(B2SUM)

###############################################################################
# Installation Details
###############################################################################

$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
	@$(PREBUILD)
	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
	cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/observium/01_redirect_apache_localhost_to_port_81.patch

	# Install xinet.d configuration
	mkdir -pv /etc/xinetd.d
	cd $(DIR_APP) && install -m 644 scripts/observium_agent_xinetd \
		/etc/xinetd.d/observium_agent_xinetd

	# Install the agent script
	cd $(DIR_APP) && install -m 755 scripts/observium_agent \
		/usr/bin/observium_agent

	# Install modules
	mkdir -pv /usr/lib/observium_agent/scripts-{available,enabled}
	install -m 755 $(DIR_APP)/scripts/agent-local/{apache,dmi,ksm,lmsensors,nfs,nfsd,nginx,postfix_mailgraph,postfix_qshape,vmwaretools} \
		/usr/lib/observium_agent/scripts-available/

	# Backup
	install -v -m 644 $(DIR_SRC)/config/backup/includes/observium-agent \
		 /var/ipfire/backup/addons/includes/observium-agent

	@rm -rf $(DIR_APP)
	@$(POSTBUILD)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 17:18   ` Matthias Fischer
@ 2026-06-22 20:42     ` Peer Dietzmann
  2026-06-23  7:39       ` Matthias Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Peer Dietzmann @ 2026-06-22 20:42 UTC (permalink / raw)
  To: development; +Cc: Peer Dietzmann

Hi Matthias,

thank you for adding this. Will try it again when it was merged but it 
looks like the tests I did today, so it should work.

Best,

Peer

On 22/06/2026 19:18, Matthias Fischer wrote:
> *Third try - fixed typo in patch line*
>
> - "-Np1" should have been "-Np2".
>
> Without the quotes, of course.
>
> Sorry...its too warm and the observium-lfs has a different path variable
> (DIR_APP) than others. I put both files in attachments.
>
> ##########################################################
>
> *Second try with attachment in unix format (line breaks)!*
>
> ##########################################################
>
> On 22.06.2026 16:20, Peer Dietzmann wrote:
>> Hello,
> Hi,
>
>> there is also another patch required to make the module working. But I
>> just can't find the file in the repository that needs to be changed:
> You won't find this file in the repository - that would be too easy. ;-)
>
> This 'apache'-file is stored in the observium archive
> (observium/scripts/agent-local/apache). And only there. It is extracted
> during the build phase, and is then immediately deleted. This is
> controlled via the lfs file:
>
> Line 83 (to be sure: first delete and then unpack source):
> ...
> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
> ...
>
> Line 103 (clean up):
> ...
> @rm -rf $(DIR_APP)
> ...
>
> IMHO the best way to apply your changes would be a patchfile (see
> attachment) which needs to be copied into the repository in the
> directory '/src/patches/observium', e.g.).
>
> Then the lfs file needs something like this in a new line *84*:
> ...
> cd $(DIR_APP) && patch -Np2 <
> $(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
> ...
> HTH
> Matthias
>
>> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be
>> changed to:
>>
>>           close INFILE;
>> } else {
>>           # grab the status URL (fresh data)
>>           @data = split /(\n)/, LWP::Simple::get(
>> 'http://localhost:81/server-status?auto' )
>>                   or die "Data fetch failure.\n";
>>
>>           # write file
>>
>> The *localhost* has to be changed to *localhost:81*
>>
>> The concerned bug that should be fixed through those three patches is:
>> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
>>
>> Best,
>>
>> Peer
>>
>> On 22/06/2026 16:15, Peer Dietzmann wrote:
>>> Redirect requests to Apache's status to it's backend, force local requests.
>>> This is required to allow Observium's agent to pull metrics from Apache.
>>>
>>> Best,
>>> Peer
>>>
>>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>>> ---
>>>    config/httpd/httpd.conf | 6 ++++++
>>>    1 file changed, 6 insertions(+)
>>>
>>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>>> index c694bffe2..09b10b50f 100644
>>> --- a/config/httpd/httpd.conf
>>> +++ b/config/httpd/httpd.conf
>>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>>    # Virtual server configuration
>>>    Include /etc/httpd/conf/vhosts.d/*.conf
>>>    
>>> +# Allow local clients to pull Apache's status
>>> +<Location /server-status>
>>> +    SetHandler server-status
>>> +    Require local
>>> +</Location>
>>> +
>>>    # EOF

-- 
Mit freundlichem Gruß
Peer Dietzmann

Brecht-IT  | Administration und Support

Brecht-Schule Hamburg GmbH
Norderstrasse 163-165 | 20097 Hamburg
Tel.: +49 40 21 11 12 - 37 | Fax: +49 40 21 11 12 - 20
E-Mail: dietzmann@brecht-schule.hamburg | www.brecht-schule.hamburg

Diese Email enthält ggfs. vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese Email irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Email.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Email ist nicht gestattet.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-22 20:42     ` Peer Dietzmann
@ 2026-06-23  7:39       ` Matthias Fischer
  2026-06-23  9:21         ` Peer Dietzmann
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Fischer @ 2026-06-23  7:39 UTC (permalink / raw)
  To: development; +Cc: dietzmann

On 22.06.2026 22:42, Peer Dietzmann wrote:
> Hi Matthias,

Hi Peer,
> thank you for adding this. Will try it again when it was merged but it 
> looks like the tests I did today, so it should work.

Sorry, but this isn't clear to me - blame the weather... ;-)

This patch hasn't been pushed, he is NOT in patchwork or GIT.
Shall I push it or will you?

Or does your message mean that it is no longer needed?

Best
Matthias

> Best,
> 
> Peer
> 
> On 22/06/2026 19:18, Matthias Fischer wrote:
>> *Third try - fixed typo in patch line*
>>
>> - "-Np1" should have been "-Np2".
>>
>> Without the quotes, of course.
>>
>> Sorry...its too warm and the observium-lfs has a different path variable
>> (DIR_APP) than others. I put both files in attachments.
>>
>> ##########################################################
>>
>> *Second try with attachment in unix format (line breaks)!*
>>
>> ##########################################################
>>
>> On 22.06.2026 16:20, Peer Dietzmann wrote:
>>> Hello,
>> Hi,
>>
>>> there is also another patch required to make the module working. But I
>>> just can't find the file in the repository that needs to be changed:
>> You won't find this file in the repository - that would be too easy. ;-)
>>
>> This 'apache'-file is stored in the observium archive
>> (observium/scripts/agent-local/apache). And only there. It is extracted
>> during the build phase, and is then immediately deleted. This is
>> controlled via the lfs file:
>>
>> Line 83 (to be sure: first delete and then unpack source):
>> ...
>> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
>> ...
>>
>> Line 103 (clean up):
>> ...
>> @rm -rf $(DIR_APP)
>> ...
>>
>> IMHO the best way to apply your changes would be a patchfile (see
>> attachment) which needs to be copied into the repository in the
>> directory '/src/patches/observium', e.g.).
>>
>> Then the lfs file needs something like this in a new line *84*:
>> ...
>> cd $(DIR_APP) && patch -Np2 <
>> $(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
>> ...
>> HTH
>> Matthias
>>
>>> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be
>>> changed to:
>>>
>>>           close INFILE;
>>> } else {
>>>           # grab the status URL (fresh data)
>>>           @data = split /(\n)/, LWP::Simple::get(
>>> 'http://localhost:81/server-status?auto' )
>>>                   or die "Data fetch failure.\n";
>>>
>>>           # write file
>>>
>>> The *localhost* has to be changed to *localhost:81*
>>>
>>> The concerned bug that should be fixed through those three patches is:
>>> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
>>>
>>> Best,
>>>
>>> Peer
>>>
>>> On 22/06/2026 16:15, Peer Dietzmann wrote:
>>>> Redirect requests to Apache's status to it's backend, force local requests.
>>>> This is required to allow Observium's agent to pull metrics from Apache.
>>>>
>>>> Best,
>>>> Peer
>>>>
>>>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>>>> ---
>>>>    config/httpd/httpd.conf | 6 ++++++
>>>>    1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>>>> index c694bffe2..09b10b50f 100644
>>>> --- a/config/httpd/httpd.conf
>>>> +++ b/config/httpd/httpd.conf
>>>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>>>    # Virtual server configuration
>>>>    Include /etc/httpd/conf/vhosts.d/*.conf
>>>>    
>>>> +# Allow local clients to pull Apache's status
>>>> +<Location /server-status>
>>>> +    SetHandler server-status
>>>> +    Require local
>>>> +</Location>
>>>> +
>>>>    # EOF
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-23  7:39       ` Matthias Fischer
@ 2026-06-23  9:21         ` Peer Dietzmann
  2026-06-23 11:32           ` Matthias Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Peer Dietzmann @ 2026-06-23  9:21 UTC (permalink / raw)
  To: development; +Cc: Peer Dietzmann

Hi Matthias,

On 23/06/2026 09:39, Matthias Fischer wrote:
> On 22.06.2026 22:42, Peer Dietzmann wrote:
>> Hi Matthias,
> Hi Peer,
>> thank you for adding this. Will try it again when it was merged but it
>> looks like the tests I did today, so it should work.
> Sorry, but this isn't clear to me - blame the weather... ;-)
>
> This patch hasn't been pushed, he is NOT in patchwork or GIT.
> Shall I push it or will you?
>
> Or does your message mean that it is no longer needed?

now I'm a bit confused, both patches I sent, must be merged into the 
next release to make it work. The patch you provided also. If you know 
where this is done, please do it, all three are required. What I meant 
is, that when everything is in testing, then I will test it again to 
confirm that the changed files are shipped correctly.

Best,

Peer

>
> Best
> Matthias
>
>> Best,
>>
>> Peer
>>
>> On 22/06/2026 19:18, Matthias Fischer wrote:
>>> *Third try - fixed typo in patch line*
>>>
>>> - "-Np1" should have been "-Np2".
>>>
>>> Without the quotes, of course.
>>>
>>> Sorry...its too warm and the observium-lfs has a different path variable
>>> (DIR_APP) than others. I put both files in attachments.
>>>
>>> ##########################################################
>>>
>>> *Second try with attachment in unix format (line breaks)!*
>>>
>>> ##########################################################
>>>
>>> On 22.06.2026 16:20, Peer Dietzmann wrote:
>>>> Hello,
>>> Hi,
>>>
>>>> there is also another patch required to make the module working. But I
>>>> just can't find the file in the repository that needs to be changed:
>>> You won't find this file in the repository - that would be too easy. ;-)
>>>
>>> This 'apache'-file is stored in the observium archive
>>> (observium/scripts/agent-local/apache). And only there. It is extracted
>>> during the build phase, and is then immediately deleted. This is
>>> controlled via the lfs file:
>>>
>>> Line 83 (to be sure: first delete and then unpack source):
>>> ...
>>> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
>>> ...
>>>
>>> Line 103 (clean up):
>>> ...
>>> @rm -rf $(DIR_APP)
>>> ...
>>>
>>> IMHO the best way to apply your changes would be a patchfile (see
>>> attachment) which needs to be copied into the repository in the
>>> directory '/src/patches/observium', e.g.).
>>>
>>> Then the lfs file needs something like this in a new line *84*:
>>> ...
>>> cd $(DIR_APP) && patch -Np2 <
>>> $(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
>>> ...
>>> HTH
>>> Matthias
>>>
>>>> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be
>>>> changed to:
>>>>
>>>>            close INFILE;
>>>> } else {
>>>>            # grab the status URL (fresh data)
>>>>            @data = split /(\n)/, LWP::Simple::get(
>>>> 'http://localhost:81/server-status?auto' )
>>>>                    or die "Data fetch failure.\n";
>>>>
>>>>            # write file
>>>>
>>>> The *localhost* has to be changed to *localhost:81*
>>>>
>>>> The concerned bug that should be fixed through those three patches is:
>>>> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
>>>>
>>>> Best,
>>>>
>>>> Peer
>>>>
>>>> On 22/06/2026 16:15, Peer Dietzmann wrote:
>>>>> Redirect requests to Apache's status to it's backend, force local requests.
>>>>> This is required to allow Observium's agent to pull metrics from Apache.
>>>>>
>>>>> Best,
>>>>> Peer
>>>>>
>>>>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>>>>> ---
>>>>>     config/httpd/httpd.conf | 6 ++++++
>>>>>     1 file changed, 6 insertions(+)
>>>>>
>>>>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>>>>> index c694bffe2..09b10b50f 100644
>>>>> --- a/config/httpd/httpd.conf
>>>>> +++ b/config/httpd/httpd.conf
>>>>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>>>>     # Virtual server configuration
>>>>>     Include /etc/httpd/conf/vhosts.d/*.conf
>>>>>     
>>>>> +# Allow local clients to pull Apache's status
>>>>> +<Location /server-status>
>>>>> +    SetHandler server-status
>>>>> +    Require local
>>>>> +</Location>
>>>>> +
>>>>>     # EOF
>
-- 
Mit freundlichem Gruß
Peer Dietzmann

Brecht-IT  | Administration und Support



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Redirect Apache status requests
  2026-06-23  9:21         ` Peer Dietzmann
@ 2026-06-23 11:32           ` Matthias Fischer
  0 siblings, 0 replies; 9+ messages in thread
From: Matthias Fischer @ 2026-06-23 11:32 UTC (permalink / raw)
  To: development

On 23.06.2026 11:21, Peer Dietzmann wrote:
> Hi Matthias,

Hi Peer,

> On 23/06/2026 09:39, Matthias Fischer wrote:
>> On 22.06.2026 22:42, Peer Dietzmann wrote:
>>> Hi Matthias,
>> Hi Peer,
>>> thank you for adding this. Will try it again when it was merged but it
>>> looks like the tests I did today, so it should work.
>> Sorry, but this isn't clear to me - blame the weather... ;-)
>>
>> This patch hasn't been pushed, he is NOT in patchwork or GIT.
>> Shall I push it or will you?
>>
>> Or does your message mean that it is no longer needed?
> 
> now I'm a bit confused, both patches I sent, must be merged into the 
> next release to make it work. The patch you provided also. If you know 
> where this is done, please do it, all three are required. What I meant 
> is, that when everything is in testing, then I will test it again to 
> confirm that the changed files are shipped correctly.

Ok, sorry for the noise, but in fact it was me who was a bit confused.
As I wrote, its the weather to blame... ;-) I just wasn't sure if you'd
like to push the third patch yourself.

I'll prepare a patch and will send it in a few minutes, no problem.

Best
Matthias
> Best,
> 
> Peer
> 
>>
>> Best
>> Matthias
>>
>>> Best,
>>>
>>> Peer
>>>
>>> On 22/06/2026 19:18, Matthias Fischer wrote:
>>>> *Third try - fixed typo in patch line*
>>>>
>>>> - "-Np1" should have been "-Np2".
>>>>
>>>> Without the quotes, of course.
>>>>
>>>> Sorry...its too warm and the observium-lfs has a different path variable
>>>> (DIR_APP) than others. I put both files in attachments.
>>>>
>>>> ##########################################################
>>>>
>>>> *Second try with attachment in unix format (line breaks)!*
>>>>
>>>> ##########################################################
>>>>
>>>> On 22.06.2026 16:20, Peer Dietzmann wrote:
>>>>> Hello,
>>>> Hi,
>>>>
>>>>> there is also another patch required to make the module working. But I
>>>>> just can't find the file in the repository that needs to be changed:
>>>> You won't find this file in the repository - that would be too easy. ;-)
>>>>
>>>> This 'apache'-file is stored in the observium archive
>>>> (observium/scripts/agent-local/apache). And only there. It is extracted
>>>> during the build phase, and is then immediately deleted. This is
>>>> controlled via the lfs file:
>>>>
>>>> Line 83 (to be sure: first delete and then unpack source):
>>>> ...
>>>> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
>>>> ...
>>>>
>>>> Line 103 (clean up):
>>>> ...
>>>> @rm -rf $(DIR_APP)
>>>> ...
>>>>
>>>> IMHO the best way to apply your changes would be a patchfile (see
>>>> attachment) which needs to be copied into the repository in the
>>>> directory '/src/patches/observium', e.g.).
>>>>
>>>> Then the lfs file needs something like this in a new line *84*:
>>>> ...
>>>> cd $(DIR_APP) && patch -Np2 <
>>>> $(DIR_SRC)/src/patches/observium/[NAME_OF_PATCHFILE]
>>>> ...
>>>> HTH
>>>> Matthias
>>>>
>>>>> Line 29 of /usr/lib/observium_agent/scripts-available/apache has to be
>>>>> changed to:
>>>>>
>>>>>            close INFILE;
>>>>> } else {
>>>>>            # grab the status URL (fresh data)
>>>>>            @data = split /(\n)/, LWP::Simple::get(
>>>>> 'http://localhost:81/server-status?auto' )
>>>>>                    or die "Data fetch failure.\n";
>>>>>
>>>>>            # write file
>>>>>
>>>>> The *localhost* has to be changed to *localhost:81*
>>>>>
>>>>> The concerned bug that should be fixed through those three patches is:
>>>>> https://bugzilla.ipfire.org/show_bug.cgi?id=14017
>>>>>
>>>>> Best,
>>>>>
>>>>> Peer
>>>>>
>>>>> On 22/06/2026 16:15, Peer Dietzmann wrote:
>>>>>> Redirect requests to Apache's status to it's backend, force local requests.
>>>>>> This is required to allow Observium's agent to pull metrics from Apache.
>>>>>>
>>>>>> Best,
>>>>>> Peer
>>>>>>
>>>>>> Signed-off-by: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
>>>>>> ---
>>>>>>     config/httpd/httpd.conf | 6 ++++++
>>>>>>     1 file changed, 6 insertions(+)
>>>>>>
>>>>>> diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf
>>>>>> index c694bffe2..09b10b50f 100644
>>>>>> --- a/config/httpd/httpd.conf
>>>>>> +++ b/config/httpd/httpd.conf
>>>>>> @@ -49,4 +49,10 @@ Include /etc/httpd/conf/default-server.conf
>>>>>>     # Virtual server configuration
>>>>>>     Include /etc/httpd/conf/vhosts.d/*.conf
>>>>>>     
>>>>>> +# Allow local clients to pull Apache's status
>>>>>> +<Location /server-status>
>>>>>> +    SetHandler server-status
>>>>>> +    Require local
>>>>>> +</Location>
>>>>>> +
>>>>>>     # EOF
>>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-23 11:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 14:15 [PATCH 2/2] Redirect Apache status requests Peer Dietzmann
2026-06-22 14:20 ` Peer Dietzmann
2026-06-22 14:59   ` Matthias Fischer
2026-06-22 15:07   ` Matthias Fischer
2026-06-22 17:18   ` Matthias Fischer
2026-06-22 20:42     ` Peer Dietzmann
2026-06-23  7:39       ` Matthias Fischer
2026-06-23  9:21         ` Peer Dietzmann
2026-06-23 11:32           ` Matthias Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox