Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.64k stars 405 forks source link

Cacti 1.2.2: Multi poller: Central Cacti cannot communicate with devices #2554

Closed stefanbrudny closed 5 years ago

stefanbrudny commented 5 years ago

Describe the bug Central Cacti cannot access the remote pollers hosts

When accessing Management -> Devices -> a device user insted of SNMP / ICMP details gets:

404 Not Found nginx/1.14.1

Same valid for apache. Surprisingly, all Remote Pollers display the SNMP / ICMP details correctly., even if there is no direct routing between the Remote Poller and a device on different Remote Poller.

To Reproduce Install multi poller and ask for unreacheable devices from Central Cacti. Expected behavior SNMP / ICMP details should be executed by correct Spine or API from Remote Poller should be leveraged to retreive the data. image

netniV commented 5 years ago

If a device is associated to a remote poller, it calls the remote_agent.php on the remote server. You likely have a misconfiguration of the location of cacti setup against the poller.

stefanbrudny commented 5 years ago

Well, I do not know whether it is configurable somewhere for the poller location, so I won't close it.

But I streamlined all contexts and it finally worked so for me it is solved.

netniV commented 5 years ago

If you have resolved your issue, then it can be closed.

max6491 commented 5 years ago

@stefanbrudny - can you please share me the steps to resolve the issue ? .. I am in the same situation with multi poller configuration.

stefanbrudny commented 5 years ago

sure, to some extent, as I am not sure how this works in detail.

In my case it was necessary to use same $url_path in config.php for all pollers. I can afford to have all cactis in root (/) context, I am not sure if going to some subcontext wouldn't break the things, I just did not test.

For me it works. I currently have 14 pollers on single host (to query IPv4 addresses in same networks), and all I can say is Cacti developers have never tested anything at this scale :-) Otherwise, they would at least try to wonder why this password for local (in my case its still remote) db is to be typed TWICE for remote pollers? :-) not to mention other improvements so one can differentiate the pollers. It is way too easy to lost to which Cacti you are currently logged in.

TheWitness commented 5 years ago

@stefanbruny, even though you are running in an unsupported configuration, it would be good to know how well things are going so far now that you have played with it for a while.

stefanbrudny commented 5 years ago

@TheWitness

Yeah, dust has gone away already and I am running some Cactis again. You know, I love Cacti, but its a mix of love and hate. Sorry for too many rants.

My setup is as follows:

*/1 * * * *     root ip netns exec dm10 /usr/bin/php /var/www/cacti-dm10/poller.php.modified
*/1 * * * *     root ip netns exec dm20 /usr/bin/php /var/www/cacti-dm20/poller.php.modified
[...]

This is my network config: for i in seq 10 34; do ip netns add dm$i ip link add veth$i type veth peer name br-veth$i ip link set veth$i netns dm$i ip -n dm$i address add 192.168.$i.100/24 dev veth$i ip -n dm$i link set veth$i up ip link set br-veth$i up ip link add name br$i type bridge ip link set br$i up ip link set br-veth$i master br$i ip address add 192.168.$i.1/24 dev br$i ip -n dm$i route add 0.0.0.0/0 via 192.168.$i.1 ip -n dm$i address add 10.0.1.1/24 dev lo done

To sum up: I was counting somehow again that I could go to scale. Instead, I had to limit my apetite to some gateways only. This is second time this chance is inevitably gone, and I doubt I'll have real occassion to go to such scale again in next years or ever again.