NPC import hosts fails (N2C)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
berserk_x
Posts: 14
Joined: Fri Jul 20, 2007 10:33 am

NPC import hosts fails (N2C)

Post by berserk_x »

Hello,

I have a problem with import (N2C) feature in NPC plugin.

NPC it seems working fine. I click to import group after select a template but when the host import it's done, the table olny show the hosts column and nothing import to Cacti.

Any idea?

Thanks
Attachments
Pantallazo.png
Pantallazo.png (46.86 KiB) Viewed 3117 times
berserk_x
Posts: 14
Joined: Fri Jul 20, 2007 10:33 am

Post by berserk_x »

Versions:

cacti 0.8.7e
nagios 3.2.1
NPC 2.0.4
berserk_x
Posts: 14
Joined: Fri Jul 20, 2007 10:33 am

Post by berserk_x »

[root@cacti objects]# php /var/www/cacti/plugins/npc/cli.php --list-hosts

Id Name Address

PHP Notice: Undefined index: address in /var/www/cacti/plugins/npc/cli.php on line 189
5 machinne1

It seems that fails to bring address of the host.

with --listgroups option works Ok
koenr
Posts: 1
Joined: Thu Jun 21, 2012 2:59 am

Re: NPC import hosts fails (N2C)

Post by koenr »

I have the same problem. Did you manage to fix it?
adrenaline7
Posts: 8
Joined: Tue Jan 22, 2013 6:36 am

Re: NPC import hosts fails (N2C)

Post by adrenaline7 »

koenr wrote:I have the same problem. Did you manage to fix it?
Same problem here too.. I did a mistake and opened another post about this here
http://forums.cacti.net/viewtopic.php?f=14&t=49406
mathong
Posts: 2
Joined: Wed May 07, 2014 7:16 am
Location: France

Re: NPC import hosts fails (N2C)

Post by mathong »

Hello !

I reply a bit late but this post appears on top of google results for this problem so i provide the answer here, thanks to mouses on this post : http://forums.cacti.net/viewtopic.php?f ... &start=375
mouses wrote:And for those ones whose importing won't work: thats a Problem related to a broken Path in the sync controller. I'm not really sure when this changed, but at least with Cacti-Version 0.8.7e [note : with Cacti 0.8.8a / npc 2.0.4 too] the cli-directory isn't located anymore in the base_directory (which normaly is /usr/share/cacti/site), but has been relocated to the base cacti directory, which reads /usr/share/cacti.

If having a version which such directory structure just navigate to /usr/share/cacti/site/plugins/npc/controllers, open the file sync.php, and change the line

Code: Select all

$path = $config["base_path"] . "/cli/add_device.php";
into

Code: Select all

$path = $config["base_path"] . "/../cli/add_device.php";
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests