PULLDATA flag not behaving as documented
The "pulldata" flag is documented as supporting an explicit ip:port combination. In the man file for hosts.cfg:
pulldata[=[IP][:port]] This option is recognized by the xymonfetch(8) utility, and causes it to poll the host for client data. The optional IP-address and port-number can be used if the client-side msgcache(8) daemon is listening on a non-standard IP-address or port-number.
but the application does not seem to be picking up the ipaddress or port specified. It always uses the address of the host. Take the following example config line:
1.2.3.4 foo.bar.com # pulldata=5.6.7.8:2014 noconn
By the documentation, I expect it to try pull data from 5.6.7.8 on port 2014. It does not. It always tries to pull from 1.2.3.4 on port 1984
Looking in xymonfetch.c, I see where the parsing is done to identify explicit IP addresses. Using a "xymondboard fields=XMH_FLAG_PULLDATA", all I get back is "PULLDATA". There is never an IP address listed. My C isn't good enough to trace farther back through the code :(
I think there may be an error in the parsing of the pulldata tag. Can anyone help me unwind this and tell me what I'm doing wrong (or if there is a bug I'll have to figure out how to patch)?
Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
On 12/19/2014 5:27 PM, John Thurston wrote:
The "pulldata" flag is documented as supporting an explicit ip:port combination. In the man file for hosts.cfg:
pulldata[=[IP][:port]] This option is recognized by the xymonfetch(8) utility, and causes it to poll the host for client data. The optional IP-address and port-number can be used if the client-side msgcache(8) daemon is listening on a non-standard IP-address or port-number.
but the application does not seem to be picking up the ipaddress or port specified. It always uses the address of the host. Take the following example config line:
1.2.3.4 foo.bar.com # pulldata=5.6.7.8:2014 noconn
By the documentation, I expect it to try pull data from 5.6.7.8 on port 2014. It does not. It always tries to pull from 1.2.3.4 on port 1984
Looking in xymonfetch.c, I see where the parsing is done to identify explicit IP addresses. Using a "xymondboard fields=XMH_FLAG_PULLDATA", all I get back is "PULLDATA". There is never an IP address listed. My C isn't good enough to trace farther back through the code :(
I think there may be an error in the parsing of the pulldata tag. Can anyone help me unwind this and tell me what I'm doing wrong (or if there is a bug I'll have to figure out how to patch)?
There is definitely something wrong here, so I'm changing the subject-line. I have enabled debug logging on xymonfetch, and tried several different combinations of configurations. When my hosts.cfg contains:
0.0.0.0 soafoo.alaska.gov # pulldata=22.92.232.2:1986
the logfile for xymonfetch shows:
29776 2014-12-22 10:46:47 Queuing request 1 to 10.20.162.162:1984 for soafoo.alaska.gov: 'pullclient 1
The logged 10. address is what DNS returns for the named host. The 22. address is where the msgcache is actually listening. xymonfetch is recognizing that it should pull from soafoo.alaska.gov, but it isn't recognizing it has been given an explicit IP:PORT from which it should pull. It is always using the IP returned by DNS and the default port (1984).
This behavior is seen on 4.3.17, running on Solaris 10, 64-bit, SPARC.
Can anyone else confirm this behavior? If you enable debug logging on the xymonfetch process, _you don't actually have to have a msgcache listening anywhere_. To reproduce, all you need is a xymon server and a resolvable hostname:
A) Add a line to hosts.cfg of the sort: 0.0.0.0 host.name.com # pulldata=10.11.12.13:2014 noconn
B) Run xymonfetch in the foreground to see what address it uses ./server/bin/xymonfetch --debug --server=ipOfYourXymonServer
You _should_ see a request queued for 10.11.12.13:2014. I suspect you will see it timing-out trying port 1984 on your host's real address.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
In my mesgs check I see - whilst a green status as well -
"No entries in /var/log/messages" what does that actually mean? /var/log/messages is heavily populated cheers Ian
| |
On Thu, January 22, 2015 3:50 am, Ian Diddams wrote:
In my mesgs check I see - whilst a green  status as well -Â
"No entries in /var/log/messages" what does that actually mean?  /var/log/messages is heavily populated cheers Ian
Is there any indication of a permissions problem? Depending on your distribution, the xymon user may or may not have read permissions for that file.
HTH,
-jc
On 22 January 2015 at 22:50, Ian Diddams <didds3 at yahoo.co.uk> wrote:
what does that actually mean? /var/log/messages is heavily populated
I don't think it's a permissions problem on the client, otherwise you'd get "Cannot open logfile /var/log/messages: Permission denied" and the colour would change to yellow.
"No entries in..." means that there are no entries considered non-green. So either you're filtering out (with "ignore") all of the messages, or there are no remaining lines that match the "trigger") expressions, or a combination of both.
Cheers Jeremy
participants (4)
-
cleaver@terabithia.org
-
didds3@yahoo.co.uk
-
jlaidman@rebel-it.com.au
-
john.thurston@alaska.gov