Data source field input error?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Data source field input error?

Post by stormonts »

In Cacti .8.8, we have an existing data source that we created, but when we try and modify a value in it we get the error below when we try to save it.
Untit323led.jpg
Untit323led.jpg (113.55 KiB) Viewed 3484 times
The previous setting was server2.te.com but the removal of that number appears to break it. We tried to create a new data source using the same template, and we are unable to enter any value in that box. In addition, if we attempt to edit the template and remove the check mark next to that field, we get the same error as shown below.
dsd.jpg
dsd.jpg (216.48 KiB) Viewed 3484 times
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Data source field input error?

Post by Voiper99 »

Sounds like the global_arrays.php issue. Try updating the file as discussed in this thread - http://forums.cacti.net/viewtopic.php?f=2&t=47018
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Data source field input error?

Post by stormonts »

No. Replacing my file with that version did not resolve the situation. Seems like the problem is spreading as this is a different data source and you can see there is no red box even though there is supposedly an issue.
v.jpg
v.jpg (134.82 KiB) Viewed 3476 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source field input error?

Post by gandalf »

Unfortunately, we doo not (yet) highlight dropdown lists in case the error is related to such a field.
But running in highest verbosity may print more information regarding this error to cacti.log (not really sure on this: I implemented a related print, but am not sure to which version this was introduced first)
R.
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Data source field input error?

Post by stormonts »

Why am I getting the error for the other data sources though that do not involve a drop down list? (the ones where I am trying to change the "remote host" value?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source field input error?

Post by gandalf »

In case I knew the exact SQL error code, I could tell, ...
It may e.g. happen, that some of the tables are broken; in this case a "repair table" would help. But I suspect a different issue. In case no SQL messages can be found and no logging of the exact error is shown, I can provide small code tweaks to provide the missing information
R.
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Data source field input error?

Post by stormonts »

Where would be the best place to look for SQL errors? I set the log level in Cacti to debug, attempted to modify the data source, but saw no SQL messages in that log.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source field input error?

Post by gandalf »

The file log/cacti.log must have permissions granted to the web server's user to print messages during browser actions.
R.
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Data source field input error?

Post by stormonts »

I just set the log level to Devel, attempted to change the data source in question, got the error, then looked at the log via cli and saw no errors about SQL or anything related to that data source/host.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source field input error?

Post by gandalf »

I am looking for an error like

Code: Select all

04/21/2012 10:07:56 PM - CMDPHP: Poller[0] Validation Error on field 'snmp_port', value 'bla': Save Failed: Field Input Error (Check Red Fields).
Please see file "lib/functions.php". Locate function "form_input_validate". Make sure to have the line with "cacti_log" as follows:

Code: Select all

	if ((!preg_match('/' . $regexp_match . '/', $field_value) || (($allow_nulls == false) && ($field_value === "")))) {
		raise_message($custom_message);
		cacti_log("Validation Error on field '".$field_name."', value '".$field_value."': " . $messages[$custom_message]["message"], false);

		$_SESSION["sess_error_fields"][$field_name] = $field_name;
	}else{
		$_SESSION["sess_field_values"][$field_name] = $field_value;
	}
Then, please try again, looking for an error message like the one above
R.
bligh
Posts: 2
Joined: Mon Nov 19, 2012 8:09 am

Re: Data source field input error?

Post by bligh »

Hey,
I'm having a similar problem. The problem started when I reinstalled Cacti on my machine. Here are the excerpts from my log.

1/19/2012 08:04:43 AM - CMDPHP: Poller[0] Validation Error on field 'rrd_maximum_111', value '|query_ifSpeed|': Save Failed: Field Input Error (Check Red Fields).
11/19/2012 08:04:43 AM - CMDPHP: Poller[0] Validation Error on field 'rrd_maximum_110', value '|query_ifSpeed|': Save Failed: Field Input Error (Check Red Fields).
11/19/2012 08:02:07 AM - CMDPHP: Poller[0] Validation Error on field 'rrd_maximum_111', value '|query_ifSpeed|': Save Failed: Field Input Error (Check Red Fields).
11/19/2012 08:02:07 AM - CMDPHP: Poller[0] Validation Error on field 'rrd_maximum_110', value '|query_ifSpeed|': Save Failed: Field Input Error (Check Red Fields).

Cheers.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source field input error?

Post by gandalf »

Please open a new thread and provide a screenshot of the data template
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests