Add logic to poller-wrapper.py to handle non-standard mysql ports in … #1302

Merged
merged 2 commits into from Jun 19, 2015

Projects

None yet

4 participants

@spinza
Contributor
spinza commented Jun 18, 2015

Added logic to handle non-standard mysql ports present in the db_host config flag. This splits out the port to pass to the mysql connection. It leaves unix sockets and other db_hosts untouched.

@laf
Member
laf commented Jun 18, 2015

Couple of things on this @spinza.

Many thanks for the PR - would you mind adding another commit to sign the contributors agreement - example: #1237

On the lines you set db_port =0, is it not worth just doing db_port = 3306 and then only have one single db connect line which always includes the port?

@laf laf added the Polling label Jun 18, 2015
@spinza
Contributor
spinza commented Jun 18, 2015

Will do on the contributors.
Unix sockets don't have ports. So i'll leave as is?

@laf
Member
laf commented Jun 18, 2015

Yup - leave as is :)

@spinza spinza I agree to the conditions of the Contributor Agreement contained in d…
…oc/General/Contributing.md.
62da143
@laf
Member
laf commented Jun 18, 2015

👍

Looks good to me. Polling is still running on CI box.

Can someone else @paulgear or @f0o take a look to be double sure as this would affect polling.

@f0o
Member
f0o commented Jun 19, 2015

Out of curiousity, the php has no extra param for dbport?

@laf
Member
laf commented Jun 19, 2015

Doesn't need it, $config['db_host'] can be 'localhost:3307';

python would then take that variable and make host and port to be used.

@f0o
Member
f0o commented Jun 19, 2015

👍

@laf laf merged commit 0763623 into librenms:master Jun 19, 2015

2 checks passed

Auto-Deploy Build finished.
Details
Scrutinizer No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment