Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 25, 2019 7:28 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Error on api_device.php
PostPosted: Fri Oct 26, 2018 4:05 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
Hello,
I have an error on a call on api_device.php.
The call I made is on the stack trace, and it's to api_device_save
Here is the output:

Fatal error: Uncaught Error: Call to undefined function poller_push_to_remote_db_connect() in /usr/share/cacti/lib/api_device.php:658
Stack trace:
#0 /usr/share/cacti/plugins/linkdiscovery/findhosts.php(600): api_device_save('0', '6', 'se-ch9-40', 'se-ch9-40.recol...', 'telvlsn', '2', '', '', '161', '500', false, '2', '2', '23', '400', '1', 'Added by Link D...', '', '', '', '', '', 10, 1, 1, 0)

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Error on api_device.php
PostPosted: Fri Oct 26, 2018 7:30 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2414
The poller_push_to_remote_db_connect() function lives in lib/poller.php. lib/api_device.php itself does not include lib/poller.php does that function would not be found unless the plugin in question was also including lib/poller.php

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Error on api_device.php
PostPosted: Mon Oct 29, 2018 1:47 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
Well not sure to understand you point
But for me if api_device.php is using an external function, it has to include all the lib needed to be able to use it.
I will definitely not include poller.php into my plugin.

As for testing purpose, it's working if I declare poller.php int my file, but nothing special about that. And it's not the way to do it

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Error on api_device.php
PostPosted: Mon Oct 29, 2018 7:21 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2414
If you have not already done so, feel free to open it as an issue on GitHub.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group