View Full Version : "Unable to get value for functionid"
just2blue4u
27-11-2006, 10:48
I constantly get this errors in my server.log:
010236:20061127:104138 Evaluation of expression [{11528}=0] failed [Unable to get value for functionid [11528]]
010236:20061127:104138 Expression [{11528}=0] cannot be evaluated [Unable to get value for functionid [11528]]
010236:20061127:104138 Evaluation of expression [{11514}=0] failed [Unable to get value for functionid [11514]]
010236:20061127:104138 Expression [{11514}=0] cannot be evaluated [Unable to get value for functionid [11514]]
010236:20061127:104138 Evaluation of expression [{11536}=0] failed [Unable to get value for functionid [11536]]
010236:20061127:104138 Expression [{11536}=0] cannot be evaluated [Unable to get value for functionid [11536]]
010236:20061127:104138 Evaluation of expression [{11545}=0] failed [Unable to get value for functionid [11545]]
010236:20061127:104138 Expression [{11545}=0] cannot be evaluated [Unable to get value for functionid [11545]]
010236:20061127:104138 Evaluation of expression [{11554}=0] failed [Unable to get value for functionid [11554]]
010236:20061127:104138 Expression [{11554}=0] cannot be evaluated [Unable to get value for functionid [11554]]
010236:20061127:104138 Evaluation of expression [{11563}=0] failed [Unable to get value for functionid [11563]]
010236:20061127:104138 Expression [{11563}=0] cannot be evaluated [Unable to get value for functionid [11563]]
After searching this board, it seems to be a problem with my triggers and templates. As the found posts are a bit old and not really helpful, i think it's the best to mention this issue again.
So how can i get rid of this lines?
The Function ID belongs to icmpping, which is in my default template and is inherited by every other template.
Server is V1.1.3
Thx 4 reading! :)
amcorreia
27-11-2006, 13:47
well,
I get same messages.
And zabbix shutdown after this.
just2blue4u
28-11-2006, 09:27
My Zabbix keeps running, but it fills the logfile with this ugly crap...
"Help!" ;)
I constantly get this errors in my server.log:
After searching this board, it seems to be a problem with my triggers and templates. As the found posts are a bit old and not really helpful, i think it's the best to mention this issue again.
So how can i get rid of this lines?
The Function ID belongs to icmpping, which is in my default template and is inherited by every other template.
Server is V1.1.3
Thx 4 reading! :)
As far as I know zabbix 1.1.x doesn't support many to many template relationships... Could be wrong though. Alexi can you clarify?
just2blue4u
30-11-2006, 09:07
My templates are created as follows:
standard
|- Windows
|- Linux
|- Web
|- Mail
|- Databases
So it's only 3 Layers. I don't think this is the problem.
How many "generations" may I set up?
MGajardo
07-12-2006, 18:46
:confused: same thing here....
005216:20061207:145816 Evaluation of expression [{21805}>1] failed [Unable to get value for functionid [21805]]
005216:20061207:145816 Expression [{21805}>1] cannot be evaluated [Unable to get value for functionid [21805]]
005216:20061207:145818 Evaluation of expression [{21817}>1] failed [Unable to get value for functionid [21817]]
005216:20061207:145818 Expression [{21817}>1] cannot be evaluated [Unable to get value for functionid [21817]]
005216:20061207:145819 Evaluation of expression [{21811}>1] failed [Unable to get value for functionid [21811]]
005216:20061207:145819 Expression [{21811}>1] cannot be evaluated [Unable to get value for functionid [21811]]
Please, does anyone could you tell me what happen?
This is my trigger: {SNMP_t:lcpuPercentBusy.delta(0)}>1
I am using version 1.1.4.-
fmtaylor2
08-12-2006, 20:25
to get rid of the messages..
[root@bofh zabbix]# mysql -uUSERID -pXXXXX
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 718052 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use zabbix
Database changed
mysql> update functions set lastvalue=0 where lastvalue is null \g
just2blue4u
11-12-2006, 16:18
Thank you very much!
Now my log looks much nicer! The Error has gone.
But nevertheless I must warn everyone who wants to follow the workaround above:
Be clever and turn off all user's media in zabbix before updating the DB table: In my case the trigger that produced the errors became true ( -> alert!!! ) and i got email for every host which had the trigger! ;)
After deactivating and activating the trigger again, everything was good again.
That was kind of shocking! :D
just2blue4u
12-12-2006, 10:13
I'm sorry i must tell you that this workaround has its issues...
A few minutes ago i added a new host into monitoring, which got the trigger, too.
As soon as the first values were in, the trigger became active.
I had to modify the trigger's expression and then set the old expr. again to get it false again.
Here's my trigger expression! Perhaps someone has a clue?
{tmpl_ux:system.cpu.util[,idle].avg(300)}<5 | {tmpl_ux:system.cpu.load.last(0)} > 15 | {tmpl_ux:system.cpu.load.avg(300)}>10
==============================
Update:
After i had temporarily changed the expression, i started the zabbix_agent of 2 of my monitored hosts. Yesterday (when i modified the MySQL-Table) these hosts were offline. Now the interesting thing:
I expected the trigger to become true again, as it did when the new created host came up (see above). But the trigger kept false for both hosts i started.
Is this because that hosts already had values in DB which just were a bit old, or is it any kind of odd behaviour?
just2blue4u
13-12-2006, 14:56
when i looked into my server.log today, i had to realize, that the errors are logged again.
This time it was always the same functionid. after some mysql-querying, i found out it belongs to a new host, added after i updated the db with the statement above.
Now my question:
May i change the table "functions" so that the default value for "lastvalue" isn't NULL but "0" ? or should i better let it be?
I got same messages in log too. That sql statement fixed already existing functions, but every function change (zabbix creates new one, not modifying existing) or trigger add results in trigger state being 'unknown' because it contains NULL, not '0'.
That began happening at some point between upgrades maybe...
Is it a bug? Can it be fixed in zabbix source code?
MGajardo
21-12-2006, 19:54
to get rid of the messages..
[root@bofh zabbix]# mysql -uUSERID -pXXXXX
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 718052 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use zabbix
Database changed
mysql> update functions set lastvalue=0 where lastvalue is null \g
Thanks fmtaylor2, no more log error but, a new problem I am getting on, No actions found ! when the trigger get ON, I should receive an email, but it is not working. <br>I checked Action/Send message and I do not detected problem. I also checked postfix and from shell I could mailing to me, I checked mail log and there were not register from zabbix<br>
Please, help me ! :rolleyes:
Is there already a solution for the problem? Is there somebody who can answer the question from just2blue4u?
May i change the table "functions" so that the default value for "lastvalue" isn't NULL but "0" ? or should i better let it be?I dont like to enter the SQL statement every time a trigger is added or changed.
Thanks to all who have worked on this issue.
I am currently running v1.1.5 on BSD and am experiencing this issue. Is the workaround posted above the best option at this point in time? Any plans to repair this in 1.4?
Sorry for the me-too post, but "me too"! I can't trust that my notifications will be sent. This is version 1.1.6.
Also I had renamed a trigger but the old name sticks in the Overview and Latest Data screens (even though the Latest Data does update).
014830:20070330:172113 Expression [{11276}#1] cannot be evaluated [Unable to get value for functionid [11276]]
Will do any troubleshooting/testing necessary to help resolve this!
Thanks...
technow0rker
19-04-2007, 20:41
Same problem.
Value "lastvalue" (table functions) magically became NULL. Workaround with manually updating MySQL tables fixed that, but I'm interested in investigating the reasons, i.e. why the situation appeared. I made an upgrade of all zabbix agents and server from 1.1.6 to 1.1.7 some time ago. Could this be a reason? Probably not. AFAIK, the problem existed with versions prior to 1.1.6 too. Maybe this is some kind of "feature"? :) I did not find any comments from developers though.
bbrendon
23-07-2007, 20:27
I thought this might go away in the 1.4 series, but I'm still getting it with 1.4.1.
elgoretto
07-09-2007, 13:36
"mee-too" + 1 ^^
Had the same issue with a fresh 1.4.2 install.
The SQL command cleaned the upcoming log entries.
elgoretto
10-09-2007, 09:54
:(
This weekend the problem showed up again.
It seems like it happened since I started to "play" with SNMP enabled hosts and SNMP auto-discovery, as I didn't see these sort of things in zabbix logs when I had only zabbix agent and simple checks enabled (and ad-hoc auto-discovery of course).
I won't be able to validate Zabbix usage in my infra if the mysql database keeps getting corrupted :(
I will remove SNMP hosts and discovery SNMP related actions, apply the DB fix again and see what happens.
--
edit:
More about this problem:
One of my 2 SNMP hosts didn't get updated (triggers) when I got "evaluation" erros in logs. As soon as the DB fix is applied, triggers change states (which is coherent).
I'm also seeing this, when I turn on SNMP.
Developers: Can you please acknowledge that you're aware of this problem?
elgoretto
13-09-2007, 09:20
I'm also seeing this, when I turn on SNMP.
Developers: Can you please acknowledge that you're aware of this problem?
Thanks for your feedback.
I also note that since my last message in this thread (I disabled SNMP actions on autodiscovery and do not interact with SNMP devices discovered so far), I had no "functionid" problem.
I'll remove one of my SNMP device and reenable SNMP discovery action, and report here if this test is significant. In a second time, I'll do this for all my SNMP devices.
elgoretto
13-09-2007, 16:15
I just looked at zabbix server logs again, and waw, that's really fast.
As I said, I reenabled SNMP related actions, and now I get "functionid" errors again.
Could a developper plan to take a look at that, please?
elgoretto
04-10-2007, 08:56
A "up" to say that since almost a month without using SNMP autodiscovery, no problem occured.
There seems to be a real problem with that feature.
elgoretto
06-11-2007, 09:47
Hi,
It's time for the "up of the month", as there seems to be no mention of this SNMP autodiscovery bug anywhere else in the forum.
Would be useful if users who have the SNMP autodiscovery actually active and running can report if they experience the same DB corruption.
Useful too if some member of the Zabbix crew could at least acknowledge this thread.
elgoretto
20-11-2007, 15:09
Thanks Niels.
Reported as ZBX-178.
Running a fresh install of 1.4.5 with imported database (mysqldumped from a v1.4.2 installation):
ZABBIX Server (daemon) v1.4.5 (25 March 2008)
Compilation time: Apr 9 2008 13:17:15
Is this related to ZBX-178? Lots of these errors in my zabbix_server.log
3972:20080416:102147 Query failed: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 [1064]
3972:20080416:102147 No function for functionid:[???:???]
3972:20080416:102147 Expression [{???:???}] cannot be evaluated [Unable to get value for functionid [???:???]]
After enabling query logging, lots of these too:
25 Query select 0,lastvalue from functions where functionid=???:???
Looking back at the server log for the 1.4.2 install, the same errors are there as well.
thanks
- cal
3972:20080416:102147 Expression [{???:???}] cannot be evaluated [Unable to get value for functionid [???:???]]
You may select all triggers having expression {???:???} directly from ZABBIX database and remove it from ZABBIX GUI. This should help. The problem will be fixed soon.
Using the information in this thread I was able to rectify this problem in Zabbix 1.4.2 many months ago. After applying the fix, below, I never had any more problems. In my case this only affected Delta items.
Unfortunately, this problem still exists in Zabbix 1.6. I have today applied the same fix to 1.6 that I applied to 1.4.2 and all seems to be OK.
mysql> alter table functions alter lastvalue set default 0;
[This changed the default value of column 'lastvalue' from NULL to 0]
mysql> update functions set lastvalue=0 where lastvalue is NULL and function='delta';
[This updated the existing values from NULL to 0]
I wonder what happened to ZBX-178 !!! :rolleyes:
MrKen
Funny, it's gone away in 1.6 on my setup. I'm running the stable 6169 build right now. Well worth getting a very recent build.
- cal
Funny, it's gone away in 1.6 on my setup. I'm running the stable 6169 build right now. Well worth getting a very recent build.
- cal
Strange how these things affect some people and not others. Leads me to wonder if this could be a problem with my Mysql and how it deals with NULL values.
I'd be interested to here from others with or without this problem who are using the same mysql as me.
On Zabbix 1.4.2 => mysql Ver 14.12 Distrib 5.0.22
On Zabbix 1.6 => mysql Ver 14.12 Distrib 5.0.45
MrKen
tekknokrat
17-10-2008, 14:51
Strange how these things affect some people and not others. Leads me to wonder if this could be a problem with my Mysql and how it deals with NULL values.
I'd be interested to here from others with or without this problem who are using the same mysql as me.
On Zabbix 1.4.2 => mysql Ver 14.12 Distrib 5.0.22
On Zabbix 1.6 => mysql Ver 14.12 Distrib 5.0.45
MrKen
also an issue with postgresql:
6421:20081017:144647 Expression [{12493}>0] cannot be evaluated [Unable to get function value: function.lastvalue IS NULL for functionid [12493]]
6419:20081017:144648 Sending configuration data to proxy. Datalen 22630
6421:20081017:144652 Expression [{12483}>0] cannot be evaluated [Unable to get function value: function.lastvalue IS NULL for functionid [12483]]
6421:20081017:144652 Expression [{12481}>0] cannot be evaluated [Unable to get function value: function.lastvalue IS NULL for functionid [12481]]
Did someone just did a check what kind of functions these are? I have userdefined which give back multiline text.
[/code]Did someone just did a check what kind of functions these are?
Found this on another thread when I was resolving this problem.
You could check:
select * from functions where functionid = 12493; [* to get itemid *]
select * from items where itemid = "itemid-from-above";
Look at hostid, description and key_.
select * from hosts where hostid = "hostid-from-above";
Now you should know what function isn't available to trigger evaluation
on which host.
MrKen
Daniel Carnevalli
23-01-2009, 17:16
I have the zabbix 1.6.1 and the same problem occurs.
I don't know what I do. The first solution may be ok, but we need to execute every tim we add a new trigger.
Anyone resolved definitely?
Tks\