netdisco / nd2-web-plugin-rancid

App::NetdiscoX::Web::Plugin::RANCID
Other
2 stars 1 forks source link

Can't get App::NetdiscoX::Web::Plugin::RANCID running #6

Open manajoe opened 8 months ago

manajoe commented 8 months ago

I try to get the App::NetdiscoX::Web::Plugin::RANCID running. I'm using Netdisco 2.67.2, I tried to install the plugin via cpan: App::NetdiscoX::Web::Plugin::RANCID This seemed to be running forever, took several hours. After that had finished, I added the following lines at the end of my environments/deployment.yml:

extra_web_plugins:
  - X::RANCID
plugin_rancid:
  location: 'http://srlsrvxx/cgi-bin/cvsweb/%GROUP%/configs/%DEVICE%?sortby=date'

After saving the file, processes are restartet, but the logfile gives me the following:

logs/netdisco-web.log

Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: Can't locate App/NetdiscoX/Web/Plugin/RANCID.pm in @INC (you may need to install the App::NetdiscoX::Web::Plugin::RANCID module) (@INC contains: /home/netdisco/site_plugins /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/lib /home/netdisco/perl5/lib /home/netdisco/perl5/bin/lib /home/netdisco/perl5/lib/perl5/5.36.0/x86_64-linux-gnu-thread-multi /home/netdisco/perl5/lib/perl5/5.36.0 /home/netdisco/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/netdisco/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl/5.36/Module/Load.pm line 78.
Can't locate App/NetdiscoX/Web/Plugin/RANCID in @INC (@INC contains: /home/netdisco/site_plugins /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/lib /home/netdisco/perl5/lib /home/netdisco/perl5/bin/lib /home/netdisco/perl5/lib/perl5/5.36.0/x86_64-linux-gnu-thread-multi /home/netdisco/perl5/lib/perl5/5.36.0 /home/netdisco/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/netdisco/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl/5.36/Module/Load.pm line 78.
Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 58.
BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 58.

Any help is appreciated.

Regards Mana

ollyg commented 8 months ago

Hi @manajoe you might have installed it to the wrong place by using cpan instead of cpanm. Try the following:

~/bin/localenv cpanm --notest App::NetdiscoX::Web::Plugin::RANCID
manajoe commented 8 months ago

Hi @ollyg, thanks a lot, that was my problem. Installing through your command worked!

One follow up question: In Netdisco all my devices are with fqdn, in Rancid I use only hostname. I tried to set by_hostname: 'any' in environments/deployment.yml, but the config-URL still points to the fqdn. Is it possible to adjust the URL to "hostname"?

ollyg commented 8 months ago

Hi @manajoe have you set domain_suffix configuration? It will be removed from the fqdn to make the hostname for the link.

manajoe commented 8 months ago

Hi @ollyg, yes, this is set:

domain_suffix:
  - '.int.rapunzel.de'

But this does not seem to have any effect, I always see the hostnames including fqdn in my webUI and in RANCiD config.