Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env.host not taking affect #42

Open
kochen opened this issue Oct 3, 2013 · 1 comment
Open

env.host not taking affect #42

kochen opened this issue Oct 3, 2013 · 1 comment

Comments

@kochen
Copy link

kochen commented Oct 3, 2013

this happens to me with all plugins when setting the env variables, vut I'll describe it for phpfpmsts.

I'm trying to change the host & path for the fpm plugin and I've set:
env.host myhost.com
env.monpath fpm-status

and then:

munin-nun php_fpm_connection

ERROR: Exception('Retrieval of URL failed.\n url: http://127.0.0.1:80/fpm_status.php\n Error: <urlopen error [Errno 111] Connection refused>',)
Traceback (most recent call last):
File "/etc/munin/plugins/php_fpm_connections", line 9, in
load_entry_point('PyMunin==0.9.27', 'console_scripts', 'pymunin-phpfpmstats')()
File "/usr/lib/python2.6/site-packages/pymunin/plugins/phpfpmstats.py", line 139, in main
sys.exit(muninMain(MuninPHPfpmPlugin))
File "/usr/lib/python2.6/site-packages/pymunin/init.py", line 958, in muninMain
ret = plugin.run()
File "/usr/lib/python2.6/site-packages/pymunin/init.py", line 775, in run
ret = self.fetch()
File "/usr/lib/python2.6/site-packages/pymunin/init.py", line 750, in fetch
self.retrieveVals()
File "/usr/lib/python2.6/site-packages/pymunin/plugins/phpfpmstats.py", line 115, in retrieveVals
stats = fpminfo.getStats()
File "/usr/lib/python2.6/site-packages/pysysinfo/phpfpm.py", line 71, in getStats
response = util.get_url(url, self._user, self._password)
File "/usr/lib/python2.6/site-packages/pysysinfo/util.py", line 135, in get_url
" url: %s\n Error: %s" % (url, str(e)))
Exception: Retrieval of URL failed.
url: http://127.0.0.1:80/fpm_status.php
Error: <urlopen error [Errno 111] Connection refused>

when I change env.host to host I get:

munin-run php_fpm_connections

Failed to parse line: host myhost.com. Should it have been 'env.host myhost.com'? at /usr/share/perl5/vendor_perl/Munin/Node/Service.pm line 110
at /etc/munin/plugin-conf.d/fpm line 2. Skipping the rest of the file at /usr/share/perl5/vendor_perl/Munin/Node/Service.pm line 110

so it reads the conf file and sees the error, but it seems like all the plugins use self variable instead of the env variable.

@kochen
Copy link
Author

kochen commented Oct 13, 2013

same for APC plugin:

#munin-run --debug php_apc_memory
Processing plugin configuration from /etc/munin/plugin-conf.d/apc
Setting /rgid/ruid/ to /99/99/
Setting /egid/euid/ to /99 99/99/
Setting up environment
Environment url = http://DOMAIN.COM/apcinfo.php
About to run '/etc/munin/plugins/php_apc_memory'

ERROR: Exception('Retrieval of URL failed.\n url: http://127.0.0.1:80/apcinfo.php?detail=1\n Error: <urlopen error [Errno 111] Connection refused>',)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant