PDA

View Full Version : This version is fantastic, but ...


krusty
09-12-2005, 12:45
hi, i really afraid about the version 1.1beta3. This version is great. But i have the following problem. I use the bulkloader to insert many hosts. And i get the following error:

[Host added: xxxxxx]

[Host added: yyyyy]

Added new item xxxxxx:CPU utilization
Added to linked host xxxxxx
Added new item xxxxxx:LAN - IN
Added to linked host xxxxxx
Added new item xxxxxx:LAN - Out
Added to linked host xxxxxx
Added new item xxxxxx:Session active
Added to linked host xxxxxx
Added new item xxxxxx:WAN - IN
Added to linked host xxxxxx
Added new item xxxxxx:WAN - Out
Added to linked host xxxxxx
Added graph LAN statistic of linked host xxxxxx
Added graph element to graph LAN statistic of linked host xxxxxx
Added graph element to graph LAN statistic of linked host xxxxxx
Added graph WAN statistic of linked host xxxxxx
Added graph element to graph WAN statistic of linked host xxxxxx
Added graph element to graph WAN statistic of linked host xxxxxx
Added graph Session of linked host xxxxxx
Added graph element to graph Session of linked host xxxxxx
Added graph CPU utilization of linked host xxxxxx
Added graph element to graph CPU utilization of linked host xxxxxx

SQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
Query: insert into graphs_items (graphid,itemid,color,drawtype,sortorder,yaxisside ) values (5,17217,'Green',2,0,)
SQL error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
Query: insert into graphs_items (graphid,itemid,color,drawtype,sortorder,yaxisside ) values (6,17220,'Cyan',2,0,)

For your information, i have created a template and i use this for all hosts in the csv file. Foreach host i want to create 6 items. This items i want to display in graphs and in a screen. But it do not really work. Can anybody help me?

My csv file looks like this:

HOST,XXXXXX,192.168.0.1,161,Monitored,netscreen,lo calhost,Router,

Thanks

pdwalker
09-12-2005, 12:51
insert into graphs_items
(graphid,itemid,color,drawtype,sortorder,yaxisside )
values
(5,17217,'Green',2,0,)

That's an easy problem to see.

The addition of the "yaxisside" parameter was added to the sql, but the data does not exist and is not being included in the SQL in this part:

...values (5,17217,'Green',2,0,<yaxisside data is missing here>)

krusty
09-12-2005, 12:57
insert into graphs_items
(graphid,itemid,color,drawtype,sortorder,yaxisside )
values
(5,17217,'Green',2,0,)

That's an easy problem to see.

The addition of the "yaxisside" parameter was added to the sql, but the data does not exist and is not being included in the SQL in this part:

...values (5,17217,'Green',2,0,<yaxisside data is missing here>)
Thanks for your fast answer. But in the Template i use yaxisside rigth and two times i use yaxisside rigth and left. Maybe this is the error? What do you think?

krusty
09-12-2005, 13:07
Now i have change the yaxis from the items in the graph to one side, but i still get the error. Where is my failure :confused:

I have add a test graph with two items. One item is yaxis rigth and onw is left.
Above all i have installed phpmyadmin an check the table graph. There i found my testgraph with value in yaxistype equal null. Is this true??? :confused: ??? Which value should be insert the table for each yaxistype :confused:

krusty
09-12-2005, 14:08
Okay, i found out that yaxisside 1 equal right and 0 equal left. But it seems that the mysql command do not included 0 or 1. Maybe there is a bug in the sql syntax? Please developer could you check this?

pdwalker
09-12-2005, 14:13
It is not yours mistake.

The problem is with the UI code in include/graphs.inc.php in function add_item_to_graph on line 43

The database upgrade from beta2 to beta3 adds a new column
alter table graphs_items add yaxisside int(1) DEFAULT '1' NOT NULL;

for existing records, the values will be null. You can check it by by running these queries against your database
select count(1) from graphs_items;
select count(1) from graphs_items where yaxisside is null;

I expect you will find the second query will return a non zero amount. Since the last field is null, no data is returned, thus you get the broken sql query.

You can do one of the following to fix it:

1/ fix your database values by setting the null ones to a non null value
update graphs_items set yaxisside = 1 where yaxisside is null;

2/ make an alteration to include/graphs.inc.php to function add_item_to_graph on line 43 (I am not a php coder, so the code addition I have written is probably incorrect)

function add_item_to_graph($graphid,$itemid,$color,$drawtyp e,$sortorder,$yaxisside)
{
if ($yaxisside == null) $yaxisside = 1;
$sql="insert into graphs_items (graphid,itemid,color,drawtype,sortorder,yaxisside ) values ($graphid,$
itemid,'$color',$drawtype,$sortorder,$yaxisside)";
$result=DBexecute($sql);
return DBinsert_id($result,"graphs_items","gitemid");
}

I would update the values in the database.

krusty
09-12-2005, 14:28
Hi, thanks for your help.

I found out a littel mistake into your description.

if ($yaxisside == null) $yaxisside = 1; :D

I have another question.
Is there a way to create screen with the bulkloader for each host?

pdwalker
09-12-2005, 14:32
I am sure that is not the only mistake. Like I said, I am not a programmer and just typed in a quick response. In fact, I just installed the software for the first time yesterday.

I suppose you can direct feature requests to the author. If a feature is really important, it might be worth getting him something from his amazon.com wishlist to help speed the process. Either that, or learn how to make changes in the UI.

- Paul

krusty
09-12-2005, 15:03
I found the next mistake. I have add up to 10 hosts. Only one is monitored and available but the zabbix_server saves no data for example values oder trends into the database. I use mysql 4.?? on a SuSE 9.1 pro Server. Maybe this is a bigger problem :confused:

The installation was without any problems.

pdwalker
09-12-2005, 15:17
It works fine here.

The key values have changed for some parameters between b2 and b3. monitors I had previously defined no longer work, so I change the key to the new values.

Look here: http://www.zabbix.com/manual/v1.1/config_items.php for a list of key parameters and their currently supported values.

Unfortunately, unless I see how you have yours setup, I cannot provide more help than that.

- Paul

krusty
09-12-2005, 15:25
I use only MIBīs like this 1.3.6.1.4.1.3224.16.1.2 or this IF-MIB::ifOutOctets.4

The version 1.1beta2 supports this MIBīs

And this MIBīs work fine. If i fire this command i get the value

snmpwalk -v 2c -c public 192.168.0.1 IF-MIB::ifOutOctets.1

pdwalker
09-12-2005, 15:40
sorry,

I am out of my depth there. I have no experience with setting up snmp.

krusty
09-12-2005, 15:52
sorry,

I am out of my depth there. I have no experience with setting up snmp.

It's a great pity. Thanks.

Can anyone else help me with this problem?

krusty
12-12-2005, 08:46
I have changed the version from 1.1beta3 to 1.1beta4 and know my MIBīs are working fine. But i have another questions to the developers. Is there an alternative to create with the bulkloader for each host one screen? If i create one Template with six items (LAN in/out, WAN in/out, Session, CPU utilization) and for each one graph (LAN, WAN, Session, CPU utilization). This works. But if i create for it one screen where all graphs shown i got only one screen without any graphs. What should i do to get for each host one screen with the bulkloader? Please help. :o

I forgot something :)

With phpMyAdmin i see in the table host_templates the following entry:
hosttemplateid hostid templateid items triggers actions graphs screens
1 10009 10008 7 7 7 7 7

What is the meaning of "7"? Can somebody explain it?

krusty
13-12-2005, 09:49
Hi,
i found out that the template function was damaged. If i create one template with different items and then use this template for including some new hosts I got no items to the new hosts.
Please note this. Thanks.