Make it possible to set a default user/passwort for new hosts

Issue #132 closed
Eugen Mayer created an issue

Not every setup allows to limit access by ip, especially since the http-section of monin is extremely limited (you cannot have OR, just and .. so you can say somethign like some of those have PW access for any ip, bu some IPs can access without ips. When you have to share the customer-view on monit oversight and then collect by mmonit, this is a huge minus).

That said, it forces us to use only PW only without "allow x.x.x.x" for hosts.

With that limitation, it is very unhandy that i have to set the host-password for every host .. if you have 60, that is just a no-go. Can you please make at lease an option to set default passwords for new hosts?

Thank you

Comments (6)

  1. Tildeslash repo owner

    Hello Eugen,

    when Monit registers itself with M/Monit, it sets the username/password automatically - provided there is "allow <username>:<password>" entry in the "set httpd" statement => it's not needed to set the username/password manually.

    Adding default credentials to M/Monit won't be secure, as if some user will be able to register new Monit host in M/Monit (for example using new M/Monit account created for some subsidiary organisation) but won't know the default credentials of Monit hosts, he'll be able to get the credentials by listening for authentication attempt from M/Monit to Monit (when the admin will try to do some action on this host).

  2. Eugen Mayer reporter

    then we have a bug - the registration does not work (for sure) with monit 5.10 and mmonit 3.3 . I have to enter the password manually.

    What i do is - creating a mmonit entry in the monit config - creating a set http in the monit config

    (all this is done autotically using chef) - then i restart monit.

    What i then see that the server pops up in monit, but what i also see is, that the password is wrong ( connection red ). Reentering the password -> works. Using no password ( host based allow ) it works OTTB.

  3. Tildeslash repo owner

    I'm not able to replicate the problem - when new host registers in M/Monit, the credentials are set.

    Few questions:

    1.) What Monit version it is?

    2.) Are the credentials in your case blank or are present, but the password is wrong? (if the password is present but it is wrong, it could be some characters encoding issue)

    3.) Please can you add example of "set httpd" statement from your monit configuration file? (obfuscate IP addresses and credentials)

  4. Log in to comment