Invalid argument supplied foreach() in graphs_new.php on 841
Moderators: Developers, Moderators
Invalid argument supplied foreach() in graphs_new.php on 841
Hello all,
please help with this issue.
Warning: Invalid argument supplied for foreach() in /htdocs/cacti/graphs_new.php on line 841
I am running on Gentoo and performed a global upgrade(emerge --sync and others), after that I cant create graphs that use Data Query;
My cacti version is: 0.8.7g
tech support file is attached.
Please let me know where to dig in for a solution.
Thanks a lot in advance.
Vitalie.
please help with this issue.
Warning: Invalid argument supplied for foreach() in /htdocs/cacti/graphs_new.php on line 841
I am running on Gentoo and performed a global upgrade(emerge --sync and others), after that I cant create graphs that use Data Query;
My cacti version is: 0.8.7g
tech support file is attached.
Please let me know where to dig in for a solution.
Thanks a lot in advance.
Vitalie.
- Attachments
-
- techsupport.txt
- (29.4 KiB) Downloaded 177 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Invalid argument supplied foreach() in graphs_new.php on
Does this happen, when you are working on a Data Query without "<direction>input" fields?
If not, please explain as exact as possible which steps you were performing
R.
If not, please explain as exact as possible which steps you were performing
R.
Re: Invalid argument supplied foreach() in graphs_new.php on
Hello,
I am trying to create a new graph after adding a new device. For example for a specific host:
Associated Data Queries
Data Query Name
1) SNMP - Interface Statistics
I go to:
Create Graphs for this Host
then I get:
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Data Query [SNMP - Interface Statistics]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
When I run in debug mode (run this data query in debug mode) I get that:
Data Query Debug Information
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
Thank you.
Vitalie.
I am trying to create a new graph after adding a new device. For example for a specific host:
Associated Data Queries
Data Query Name
1) SNMP - Interface Statistics
I go to:
Create Graphs for this Host
then I get:
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Warning: Invalid argument supplied for foreach() in /var/www/monit.eqnet.us/htdocs/cacti/graphs_new.php on line 841
Data Query [SNMP - Interface Statistics]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
When I run in debug mode (run this data query in debug mode) I get that:
Data Query Debug Information
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/monit.eqnet.us/htdocs/cacti/resource/snmp_queries/interface.xml'
Thank you.
Vitalie.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Invalid argument supplied foreach() in graphs_new.php on
Does an snmpwalk report any valid interfaces?
What does s second snmpwalk of the given OID present?
R.
What does s second snmpwalk of the given OID present?
R.
Re: Invalid argument supplied foreach() in graphs_new.php on
Hello,
when I ran it last time there was a packet loss to that location...
I am attaching normal reply where you can see that it finds interfaces and returns values...
Thanks.
Vitalie.
when I ran it last time there was a packet loss to that location...
I am attaching normal reply where you can see that it finds interfaces and returns values...
Thanks.
Vitalie.
- Attachments
-
- if_.txt
- (924.21 KiB) Downloaded 118 times
Re: Invalid argument supplied foreach() in graphs_new.php on
Snmpwalk result is attached.
- Attachments
-
- snmpwalk.txt
- (63.84 KiB) Downloaded 152 times
Re: Invalid argument supplied foreach() in graphs_new.php on
Any finding, advice?
Thanks.
Vitalie.
Thanks.
Vitalie.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Invalid argument supplied foreach() in graphs_new.php on
Try to change the line prior to the offending line to in other words: add the test sizeof($field_names) that makes the foreach loop complain ...
R.
Code: Select all
if ($field_array["direction"] == "input" && sizeof($field_names)) {
R.
Re: Invalid argument supplied foreach() in graphs_new.php on
gandalf, thanks for your reply.
I have tried and now I get no warning but the query does not return any values, so all the time I get empty values and cat graph anything.
Please advice.
Thanks.
I have tried and now I get no warning but the query does not return any values, so all the time I get empty values and cat graph anything.
Please advice.
Thanks.
Re: Invalid argument supplied foreach() in graphs_new.php on
Hello,
issue solved:
SELECT DISTINCT field_name FROM host_snmp_cache WHERE host_id=78 AND snmp_query_id=14;
ERROR 145 (HY000): Table './cacti/host_snmp_cache' is marked as crashed and should be repaired
looks like it was not populating field_names...
After a table repair it works fine.
Thanks.
issue solved:
SELECT DISTINCT field_name FROM host_snmp_cache WHERE host_id=78 AND snmp_query_id=14;
ERROR 145 (HY000): Table './cacti/host_snmp_cache' is marked as crashed and should be repaired
looks like it was not populating field_names...
After a table repair it works fine.
Thanks.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Invalid argument supplied foreach() in graphs_new.php on
Thanks for the reply. I was getting out of ideas ...
R.
R.
Who is online
Users browsing this forum: No registered users and 2 guests