Data Input for method does not appear to be whitelisted.

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Edrick
Posts: 9
Joined: Fri Apr 17, 2020 12:02 am

Data Input for method does not appear to be whitelisted.

Post by Edrick »

So I'm trying to follow the installers instructions however this step doesn't seem very clear to me? So looking for some help;

To make identifying Data Input Methods in this state, we have provided a validation script in Cacti's CLI directory that can be run with the following options:

This section of the installer tells me to uncomment $input_whitelist in the config file, which I did and then it gives me 3 commands to run afterwards from CACTIs CLI Directory? But provides no instructions on doing so;

So as such I've tried;

cd /var/lib/cacti/cli/
[cli]# php -q input_whitelist.php --audit
ERROR: Data Input Whitelist file '/usr/local/etc/cacti/input_whitelist.json' does not exist. Please run with the '--update' option.

php -q input_whitelist.php --update
ERROR: Data Input whitelist file '/usr/local/etc/cacti/input_whitelist.json' not writeable.

When looking into it the directory its calling is set in the config.php file in the line it told me to uncomment, however that file input_whitelist.json doesn't exist on the server? I also looked in the downloaded Cacti linux install on my local computer and there was no file like that either.

Soooo what gives?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Data Input for method does not appear to be whitelisted.

Post by TheWitness »

You have to decide where to put it. That is the default location for Debian. But you may not be using Debian.
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?
Edrick
Posts: 9
Joined: Fri Apr 17, 2020 12:02 am

Re: Data Input for method does not appear to be whitelisted.

Post by Edrick »

Where do I get the file? It does not seem to be in the downloaded tar.gz file
Edrick
Posts: 9
Joined: Fri Apr 17, 2020 12:02 am

Re: Data Input for method does not appear to be whitelisted.

Post by Edrick »

Anyone have an idea?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Data Input for method does not appear to be whitelisted.

Post by TheWitness »

You have to create it. Search for "whitelist" in the CLI directory and then run it using the --help option. Follow your nose.
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?
Edrick
Posts: 9
Joined: Fri Apr 17, 2020 12:02 am

Re: Data Input for method does not appear to be whitelisted.

Post by Edrick »

So as you say it assumes that path based on Debian.

The error would seem to be that, the path doesn't exist thus isn't writable. But none of the documentation tells me if I should be creating any random folder or be referencing an actual spot that already exists just in a different spot on CentOS

However I am running CentOS so is there an existing folder structure I should be putting this file in or do I just select it at random?

This would seem to be an important thing to know in documentation for implementing a feature that's suppose to secure the script.

Would /var/lib/cacti/input_whitelist.json

be an acceptable path based on it seems to be where CentOS is putting the cacti information or is there a method behind setting the path? I changed it to that path and it worked however I want to make sure I'm putting it in a correct / secure spot

Thanks :)
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Data Input for method does not appear to be whitelisted.

Post by netniV »

that is more common for a centos path, as with most instructions, they are a a guide and usually based on one standard.

If you find that this needs improving, please add some extra documentation on the github documentation repo so others can understand it better :)

https://github.com/cacti/documentation/
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
xskipper
Posts: 2
Joined: Fri Apr 01, 2022 8:59 am

Re: Data Input for method does not appear to be whitelisted.

Post by xskipper »

Just create input_whitelist file and give writing permission. Execute the following steps

cd /usr/local/etc/
sudo mkdir cacti/
cd cacti/
sudo nano input_whitelist.json (save)
sudo chmod u+x o+w input_whitelist.json
sudo php -q input_whitelist.php --audit
sudo php -q input_whitelist.php --update --push
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Data Input for method does not appear to be whitelisted.

Post by TheWitness »

Yea, maybe a pull request against this page might be in order.

https://github.com/Cacti/documentation/ ... Methods.md

Are you up for it?
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests