ZABBIX Forums  
  #11  
Old 30-12-2009, 11:19
giapnguyen giapnguyen is offline
Member
 
Join Date: Aug 2009
Posts: 31
Default

Quote:
Originally Posted by mrspy View Post
I'm having the following problems:

Code:
* Undefined index: templateid[/home/zabbix/public_html_svn/snmp_builder.php:125]
* Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
* Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
If I change the template, nothing happens...
If I change the MIB I have the following errors:

Code:
    * Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
    * Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
    * Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
Zabbix Server v1.8 (revision 8565)
Zabbix Frontend SVN revision 8917
Ubuntu 8.04.3 LTS

Tested with Firefox and Chrome
LOL, it is because I use index without check it existed or not - it's my bad but php accept it. Maybe in this version (debug purpose), developer increase error report level (E_NOTICE), than the warning showed.
Reply With Quote
  #12  
Old 30-12-2009, 13:19
Firm Firm is offline
Senior Member
 
Join Date: Dec 2009
Posts: 339
Default

giapnguyen,

It works now. The problem was in PHP safe_mode=On that has prevented execution of all programs except from the directory set by safe_mode_exec_dir. After turning safe_mode=Off it works as should.
Reply With Quote
  #13  
Old 30-12-2009, 20:59
ericgearhart ericgearhart is offline
Senior Member
 
Join Date: Jan 2009
Posts: 114
Default

Just to help folks out, I was getting this error in /var/log/http/error_log:

Code:
PHP Fatal error:  Call to undefined function json_encode() in /var/www/html/snmp_builder.php on line 421
Installing php's json fixed that:
Code:
yum -y install php-pecl-json
so that at least I get the same page as the previous person posting to this thread who was having problems with CentOS

I'm on CentOS 5.4, and the php json pecl extension wasn't installed it looks like
Reply With Quote
  #14  
Old 30-12-2009, 21:18
ericgearhart ericgearhart is offline
Senior Member
 
Join Date: Jan 2009
Posts: 114
Default

I was able to test this today, and it works! I pointed snmpbuilder at a Cisco 2960G switch here at work and added a few interface items... as you can see at the bottom I also get the "Undefined index" errors but it seems to work OK nevertheless. I'm on CentOS 5.4.

The screenshot speaks for itself:
Attached Images
 
Reply With Quote
  #15  
Old 31-12-2009, 03:34
giapnguyen giapnguyen is offline
Member
 
Join Date: Aug 2009
Posts: 31
Default

Quote:
Originally Posted by ericgearhart View Post
Just to help folks out, I was getting this error in /var/log/http/error_log:

Code:
PHP Fatal error:  Call to undefined function json_encode() in /var/www/html/snmp_builder.php on line 421
Installing php's json fixed that:
Code:
yum -y install php-pecl-json
so that at least I get the same page as the previous person posting to this thread who was having problems with CentOS

I'm on CentOS 5.4, and the php json pecl extension wasn't installed it looks like
I think zabbix already use json to draw map. Whatever php-json is required.
Reply With Quote
  #16  
Old 31-12-2009, 05:23
ericgearhart ericgearhart is offline
Senior Member
 
Join Date: Jan 2009
Posts: 114
Default

Quote:
Originally Posted by giapnguyen View Post
I think zabbix already use json to draw map. Whatever php-json is required.
Well maps were working before I installed php-json... I hadn't done a lot with maps(I'm still playing with items and triggers) but I hadn't noticed that the default "Local Network" map wasn't working
Reply With Quote
  #17  
Old 31-12-2009, 17:58
jroberson jroberson is offline
Senior Member
 
Join Date: May 2008
Location: Texas
Posts: 124
Talking

Wow, that looks incredible! Just another reason for me to get off my lazy butt and upgrade to 1.8.

Great Job and Much Appreciated!
Reply With Quote
  #18  
Old 31-12-2009, 19:34
laakness laakness is offline
Junior Member
 
Join Date: Oct 2009
Posts: 20
Default

This is probably the coolest thing since canned beer

Installed and had it working in about 15 minutes.
Reply With Quote
  #19  
Old 03-01-2010, 20:44
laakness laakness is offline
Junior Member
 
Join Date: Oct 2009
Posts: 20
Default

Not sure if it's possible but I have a suggestion/feature request for this.

Can you lock the Column Title row in the Table View so that when you are scrolling around the list you know what you are clicking on easier?
Reply With Quote
  #20  
Old 03-01-2010, 20:50
ericgearhart ericgearhart is offline
Senior Member
 
Join Date: Jan 2009
Posts: 114
Default

After playing with this over the past week it's become increasingly apparent that Zabix really, really needs a way to associate an SNMP ifAlias with an interface.... Cacti does this brilliantly already and it would be a much welcomed addition to Zabbix
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:20.