zzOzz / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

[enhancement] extend alerthandler with hostname #491

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is an enhancement request.

When running multiple PWM nodes accross a DTAP environment it is kind of hard 
to determine the origin of the AlertHandler notifications. 

The current implementation of the AlertHandler only insert the instanceID of 
the PWM node, which is a random generated value. Attached a patch (to trunk) to 
include the Canonical Hostname in the message body.

Original issue reported on code.google.com by sebastia...@gmail.com on 1 Oct 2013 at 9:19

Attachments:

GoogleCodeExporter commented 9 years ago
I think its a good patch and I will apply, thanks!  However it should be 
pointed out: 

1) the java returned hostname of the box is often unhelpful depending on how 
the box is configured
2) the instance ID is entirely configurable (Settings -> General), you could 
put a meaningful hostname as the instance ID.

Original comment by jrivard on 1 Oct 2013 at 8:54

GoogleCodeExporter commented 9 years ago
I'm aware of the limitations of getCanonicalHostName, but in most cases it 
seems to be working pretty well.

Maybe the root cause of this patch is that the documentation on instanceID is 
absent. It is not entirely clear what values are allowed (type of characters, 
length etc.).

The instanceID is also part of the PWM configuration, while retrieving the 
hostname dynamically, does not. Therefore it would be better to use something 
like getCanonicalHostName: multiple nodes can have the same PWM configuration 
file which makes it easier to administrate.

Original comment by sebastia...@gmail.com on 2 Oct 2013 at 7:43

GoogleCodeExporter commented 9 years ago
I noticed that my initial patch missed the canonical hostname for the daily 
statistics. Hereby an updated version.

Original comment by sebastia...@gmail.com on 25 Oct 2013 at 7:18

Attachments: