While trying to work out why my non SNMP device wasnt responding to UDP pings (switched to ICMP now) I think I found the following problem in ping.php while I had debug switched on.
The log always reported :
07/09/2007 12:05:21 PM - CMDPHP: Poller[0] Host[49] PING: default
whereas I could see from the code it should be reporting 'UDP ping Timed out' or 'Refused'.
The condition block at line 383 was setting values in $this->response, a previously unused variable. I changed it to $this->ping_response (like all the other reported conditions) and now it reported correctly in the log.
So the changed code reads :
383 if ($retry_count >= $this->retries) {
384 $this->status = "down";
385 if ($error == "timeout") {
386 $this->ping_response = "UDP ping Timed out";
387 }else{
388 $this->ping_response = "UDP ping Refused";
389 }
390 $this->close_socket();
391
392 return false;
393 }
I don't know if I'm the first to see this, but could whoever maintains the fine code please check?
Possible bug in lib/ping.php? Cacti 0.8.6j with patches.
Moderators: Developers, Moderators
-
- Posts: 3
- Joined: Fri Jul 06, 2007 11:16 am
- Location: Liverpool, UK
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Could you please open a bug at bugs.cacti.net and then report back here that you have done so. Also, please add the content here into the bug report.
Thanks,
TheWitness
Thanks,
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 3
- Joined: Fri Jul 06, 2007 11:16 am
- Location: Liverpool, UK
Who is online
Users browsing this forum: No registered users and 11 guests