ZABBIX FEATURE REQUESTS

"Template with application xxx already linked to host"

Details

Description

I have Template_A which has an application 'XXX' linked to a host. When I want to add Template_B, which also has an application 'XXX', i get the above error.. Multiple templates should be able to add their items in the same application, right? This worked in 1.6.x just fine..

Issue Links

Activity

Hide
Mischa Bachmann added a comment -

This is something that should be allowed. In 1.8.2 there was a work around with commenting out some code in the host.inc.php file. Since 1.8.3 there seems to be a second check after linking the templates, when trying to save the host which gets me stuck.

I don't understand why this isn't' allowed? How should we be working with templates and applications?

This problem occurs in the final release of 1.8.3. I've read the post about it being implemented in 2.0 but that could take months when not years to be released and at the moment we can't use our entire Zabbix configuration any more which is based on linking templates to hosts and those templates share the same application name.

Show
Mischa Bachmann added a comment - This is something that should be allowed. In 1.8.2 there was a work around with commenting out some code in the host.inc.php file. Since 1.8.3 there seems to be a second check after linking the templates, when trying to save the host which gets me stuck. I don't understand why this isn't' allowed? How should we be working with templates and applications? This problem occurs in the final release of 1.8.3. I've read the post about it being implemented in 2.0 but that could take months when not years to be released and at the moment we can't use our entire Zabbix configuration any more which is based on linking templates to hosts and those templates share the same application name.
Hide
richlv added a comment -

it is quite unfortunate, but allowing to link multiple templates with same application to same entity would break inheritance - how would you know which template the application comes from ?

so it should be redesigned. when there's some time for that

Show
richlv added a comment - it is quite unfortunate, but allowing to link multiple templates with same application to same entity would break inheritance - how would you know which template the application comes from ? so it should be redesigned. when there's some time for that
Hide
Greg Swift added a comment -

I just spent quite a bit of time trying to properly implement distributed templates that can be used for linking that contained applications. Tried this two ways, and both broke. Now we have to go back to no applications. Seems pointless to have Applications if they can't Inherit duplicates.

Maybe its just me, but I think that Applications should be removed from the template/host level, and just exist as their own. This way there is no such thing as conflicting. You just select the appropriate Application for the item for the full list.

Show
Greg Swift added a comment - I just spent quite a bit of time trying to properly implement distributed templates that can be used for linking that contained applications. Tried this two ways, and both broke. Now we have to go back to no applications. Seems pointless to have Applications if they can't Inherit duplicates. Maybe its just me, but I think that Applications should be removed from the template/host level, and just exist as their own. This way there is no such thing as conflicting. You just select the appropriate Application for the item for the full list.
Hide
James Tiner added a comment -

Greg's solution sounds reasonable and appropriate to me. The ability to have and manage applications globally and separately from the templates would be very nice and much easier to manage.

Show
James Tiner added a comment - Greg's solution sounds reasonable and appropriate to me. The ability to have and manage applications globally and separately from the templates would be very nice and much easier to manage.
Hide
Walter Heck added a comment -

Agreeing with Greg and James. Applications in their current form are useless, we end up having all our items without application because it just doesn't work properly in larger environments.

Show
Walter Heck added a comment - Agreeing with Greg and James. Applications in their current form are useless, we end up having all our items without application because it just doesn't work properly in larger environments.
Hide
Edward Rudd added a comment -

I have been running a custom patched version of zabbix frontend that allows duplicate applications (ie.. the commenting out of the check in hosts.inc.php) and now commenting out the block in api/classes/class.ctemplate.php. I've been doing this since this restriction was first added with no ill effects.. Though I don't have templates based on other templates.

With out the ability to have applications be re-used between templates it makes the application system useless. And in reply to richlv, why do I care which template the application came from? I only care where the item came from.

Applications should just be a global entity that items link to as I see no functionality in zabbix that make use of some special application to template binding to bring some kind of magic to my life.

Show
Edward Rudd added a comment - I have been running a custom patched version of zabbix frontend that allows duplicate applications (ie.. the commenting out of the check in hosts.inc.php) and now commenting out the block in api/classes/class.ctemplate.php. I've been doing this since this restriction was first added with no ill effects.. Though I don't have templates based on other templates. With out the ability to have applications be re-used between templates it makes the application system useless. And in reply to richlv, why do I care which template the application came from? I only care where the item came from. Applications should just be a global entity that items link to as I see no functionality in zabbix that make use of some special application to template binding to bring some kind of magic to my life.
Hide
Andy Shinn added a comment -

I was running into this issue also and I think Greg's suggestion makes sense. I use applications as a sort of 'filter' for types of items and it would still make sense having them global.

Show
Andy Shinn added a comment - I was running into this issue also and I think Greg's suggestion makes sense. I use applications as a sort of 'filter' for types of items and it would still make sense having them global.
Hide
Christian Lahti added a comment -

Edward:

I do not intend to have inherited/distributed templates, so is there any instructions on which lines to comment out in hosts.inc.php and api/classes/class.ctemplate.php so I can add multiple templates to a host with matching Application names?

Thanks!

/Chris

Show
Christian Lahti added a comment - Edward: I do not intend to have inherited/distributed templates, so is there any instructions on which lines to comment out in hosts.inc.php and api/classes/class.ctemplate.php so I can add multiple templates to a host with matching Application names? Thanks! /Chris
Hide
Edward Rudd added a comment -

Patch being applied to my local installations.

Show
Edward Rudd added a comment - Patch being applied to my local installations.
Hide
Eric Renfro added a comment - - edited

This patch definitely does not work as expected.

I tried to make a stacked template with an Application group "Services", removed from any other base OS/Distro base templates I had originally that other templates based off of. For example, I added a Services base template that all it did was add the Application called "Services", then I made a Service_SSH template that used the Services template, added in the SSH Item and Trigger. Also broke out the Zabix-Server template and ripped it out the same way so it was it's own template that used the Services sub-template, and tried to put them into a host, and no go. Refused it all completely.

Originally testing, I had the SSH service defined in my OS_Linux template under the Services application group and patched it, modified my Service_ZabbixServer template to define a "Services" application group and linked it to the template. What happened was, in the "Latest Data" view is it took SSH out of the "Services" application and put it into "- other -" which is basically the same as "None", but put ZabbixServer into the Services application group as expected otherwise.

I even tried testing with using the individual Service_SSH and Service_ZabbixServer defining the Services application, and still, failure IF it's linked to any hosts already. You have to unlink the templates first, do your changes, then re-link them back in and it works. There's still more checks going on. After this was done, everything was grouped together in the "Services" application group at the least. This is a good thing so far.

I agree with a lot of the people here though. "Applications" should be a global definition itself and not so much a per-template construct. Since the entire template construct itself is XML-based, melding them together if they DO define Applications should not be much of an issue in itself. I know PHP's XML functions are not always very simplistic or clean sometimes, but it's efficient enough to do stuff like this without too much hassle, massaging or what-not with the XML definition and utilizing information since this is all stored in a database in the end result anyway.

Show
Eric Renfro added a comment - - edited This patch definitely does not work as expected. I tried to make a stacked template with an Application group "Services", removed from any other base OS/Distro base templates I had originally that other templates based off of. For example, I added a Services base template that all it did was add the Application called "Services", then I made a Service_SSH template that used the Services template, added in the SSH Item and Trigger. Also broke out the Zabix-Server template and ripped it out the same way so it was it's own template that used the Services sub-template, and tried to put them into a host, and no go. Refused it all completely. Originally testing, I had the SSH service defined in my OS_Linux template under the Services application group and patched it, modified my Service_ZabbixServer template to define a "Services" application group and linked it to the template. What happened was, in the "Latest Data" view is it took SSH out of the "Services" application and put it into "- other -" which is basically the same as "None", but put ZabbixServer into the Services application group as expected otherwise. I even tried testing with using the individual Service_SSH and Service_ZabbixServer defining the Services application, and still, failure IF it's linked to any hosts already. You have to unlink the templates first, do your changes, then re-link them back in and it works. There's still more checks going on. After this was done, everything was grouped together in the "Services" application group at the least. This is a good thing so far. I agree with a lot of the people here though. "Applications" should be a global definition itself and not so much a per-template construct. Since the entire template construct itself is XML-based, melding them together if they DO define Applications should not be much of an issue in itself. I know PHP's XML functions are not always very simplistic or clean sometimes, but it's efficient enough to do stuff like this without too much hassle, massaging or what-not with the XML definition and utilizing information since this is all stored in a database in the end result anyway.
Hide
Edward Rudd added a comment -

Eric,

I have found that sometimes zabbix will leave Old applications linked to a host, even after the template has been delinked.. You have to edit the applications direct on the host and remove the "Extra" ones and then try re-linking.

In my personal use I'm not using but one "stacked" template. Most of my templates just get linked directly to the host and DO repeat applications (like Processes, CPU, Disk) and those correctly merge with my patch. (which I've been using variations of that patch since zabbix 1.4?)..

I do hope that Zabbix does change the way applications are done, as the current way is extremely limited and provides no value in being limited this way. This and the Broken Jabber support (lack of doing DNS Service lookups, which I have provided a patch for.. for YEARS). are the only two things that frustrate me about zabbix. Maybe one day when I have free time I'll rework a proper patch for this issue that corrects the way applications are used.

Show
Edward Rudd added a comment - Eric, I have found that sometimes zabbix will leave Old applications linked to a host, even after the template has been delinked.. You have to edit the applications direct on the host and remove the "Extra" ones and then try re-linking. In my personal use I'm not using but one "stacked" template. Most of my templates just get linked directly to the host and DO repeat applications (like Processes, CPU, Disk) and those correctly merge with my patch. (which I've been using variations of that patch since zabbix 1.4?).. I do hope that Zabbix does change the way applications are done, as the current way is extremely limited and provides no value in being limited this way. This and the Broken Jabber support (lack of doing DNS Service lookups, which I have provided a patch for.. for YEARS). are the only two things that frustrate me about zabbix. Maybe one day when I have free time I'll rework a proper patch for this issue that corrects the way applications are used.
Hide
Eric Renfro added a comment -

Yeah, Edward. I noticed if I did it specific ways, applying the template, it did work, but you can't change it once it's linked. Have to delink and clear, edit, then re-link. There's another check being done somewhere during the editing you might want to look into for a patch revision.

You mentioned also the patch for Jabber? Is there a link for that because I could really use that myself. I had hacked in my own jabber CLI client last time I setup Zabbix and if there's a patch to fix the current one built-in to Zabbix that would be even better.

Show
Eric Renfro added a comment - Yeah, Edward. I noticed if I did it specific ways, applying the template, it did work, but you can't change it once it's linked. Have to delink and clear, edit, then re-link. There's another check being done somewhere during the editing you might want to look into for a patch revision. You mentioned also the patch for Jabber? Is there a link for that because I could really use that myself. I had hacked in my own jabber CLI client last time I setup Zabbix and if there's a patch to fix the current one built-in to Zabbix that would be even better.
Hide
Eric Renfro added a comment -

I did some analysis testing on the results of what happends when you use this patch and link templates with shared applications into it. So far consistancy-wise, it looks koshier too.

Each "Application" gets added per hostid, so there's some redundancy there for each host being added. This also seems to happen for every host with it's own set of applications as well. The default initial Zabbix Server host, and my second host I added afterwards, using my base template.

There is however a wierdness involved in the actual data. Not sure where it's specifically coming from. I have two hosts setup presently. Hostid 10001, and 10002 appear to be the Zabbix Server and the first host I added. I have another one, 10008, that I don't recognize as anything specific. That Hostid has Processes, Log Files, OS, Network, Performance, Services, but not any of the others that are common from my OS_Linux base template I've been using, which has Services, Filesystem, Network, Processes, Log files, CPU, Memory, Performance, Availability, General, and Integrity. Hostid 10002 lacks only Logfiles from that list.

Show
Eric Renfro added a comment - I did some analysis testing on the results of what happends when you use this patch and link templates with shared applications into it. So far consistancy-wise, it looks koshier too. Each "Application" gets added per hostid, so there's some redundancy there for each host being added. This also seems to happen for every host with it's own set of applications as well. The default initial Zabbix Server host, and my second host I added afterwards, using my base template. There is however a wierdness involved in the actual data. Not sure where it's specifically coming from. I have two hosts setup presently. Hostid 10001, and 10002 appear to be the Zabbix Server and the first host I added. I have another one, 10008, that I don't recognize as anything specific. That Hostid has Processes, Log Files, OS, Network, Performance, Services, but not any of the others that are common from my OS_Linux base template I've been using, which has Services, Filesystem, Network, Processes, Log files, CPU, Memory, Performance, Availability, General, and Integrity. Hostid 10002 lacks only Logfiles from that list.
Hide
Edward Rudd added a comment -

The jabber patches are in issue ZBX-1029

Show
Edward Rudd added a comment - The jabber patches are in issue ZBX-1029
Hide
Eric Renfro added a comment -

Database analysis tests:

Zabbix itself is probably partially to blame for this as well, since I was looking at all the hostid's earlier, and they're not even in-use anymore apparently. There's been no cleanup at all. My hostid's are completely different.

Regardless though. I did a test. Added Service_SSH template which defines Service application, added Service_HTTP template after that. Checked the database for the hostid associated with that host, and found Services linked to the Service_SSH id number. Deleted Service_HTTP, database row remained. Deleted Service_SSH, row still remained.

Now, after this, I looked at the host's "Applications" template list, and saw it still had Service_SSH:Service as an Application, and it cannot be deleted due to and error: Cannot delete templated application

So there's other problems as well to take note of this specific issue. Along with why Zabbix itself isn't cleaning out old records of unassociated hostid's...

Show
Eric Renfro added a comment - Database analysis tests: Zabbix itself is probably partially to blame for this as well, since I was looking at all the hostid's earlier, and they're not even in-use anymore apparently. There's been no cleanup at all. My hostid's are completely different. Regardless though. I did a test. Added Service_SSH template which defines Service application, added Service_HTTP template after that. Checked the database for the hostid associated with that host, and found Services linked to the Service_SSH id number. Deleted Service_HTTP, database row remained. Deleted Service_SSH, row still remained. Now, after this, I looked at the host's "Applications" template list, and saw it still had Service_SSH:Service as an Application, and it cannot be deleted due to and error: Cannot delete templated application So there's other problems as well to take note of this specific issue. Along with why Zabbix itself isn't cleaning out old records of unassociated hostid's...
Hide
Wesley added a comment -

I am still having this problem in latest version (2.0.1)...

Show
Wesley added a comment - I am still having this problem in latest version (2.0.1)...
Hide
Eli Stair added a comment -

We see this all over the place as well. It appears to me to be a bug, not an enhancement/feature-improvement... why is this listed as a ZBXNEXT feature-request?

Show
Eli Stair added a comment - We see this all over the place as well. It appears to me to be a bug, not an enhancement/feature-improvement... why is this listed as a ZBXNEXT feature-request?
Hide
Greg Swift added a comment -

My understanding is that its not a bug because they changed it to this behavior on purpose.

Design flaw != bug
Design flaw == enhancement/feature-improvement

Show
Greg Swift added a comment - My understanding is that its not a bug because they changed it to this behavior on purpose. Design flaw != bug Design flaw == enhancement/feature-improvement
Hide
Daniel Turner added a comment -

Vote += 1

I would love to see this implemented or rather fixed. I have always worked around it in the past but, and I should mention that this is my first time using the 2.0 base, after defining a bucket load of templates for a complicated system, nesting said templates and then attempting to assign to a host only to be thwarted with a slap in the face was not welcome. I should have known really but it is quite confusing to allow the nesting of the template, which creates copies of the items anyway, but then forbid the host assignment.

Show
Daniel Turner added a comment - Vote += 1 I would love to see this implemented or rather fixed. I have always worked around it in the past but, and I should mention that this is my first time using the 2.0 base, after defining a bucket load of templates for a complicated system, nesting said templates and then attempting to assign to a host only to be thwarted with a slap in the face was not welcome. I should have known really but it is quite confusing to allow the nesting of the template, which creates copies of the items anyway, but then forbid the host assignment.
Hide
Andris Zeila added a comment - - edited

Database upgrade patch added in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-928

Show
Andris Zeila added a comment - - edited Database upgrade patch added in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-928
Hide
Andris Zeila added a comment -

Server side support added in r35331

Show
Andris Zeila added a comment - Server side support added in r35331
Hide
dimir added a comment - - edited

(1) [S] Host item linked to application is left without an application if you link and unlink a template with application with the same name.

Situation:

  • host H has application A
  • H has item I linked to A
  • template T has application with the same name A

Steps to reproduce:

  • link T to H
  • unlink T from H
  • observe host H and it's item I, they are left without application A

Andris Zeila RESOLVED in r35364

dimir Great, CLOSED

Show
dimir added a comment - - edited (1) [S] Host item linked to application is left without an application if you link and unlink a template with application with the same name. Situation:
  • host H has application A
  • H has item I linked to A
  • template T has application with the same name A
Steps to reproduce:
  • link T to H
  • unlink T from H
  • observe host H and it's item I, they are left without application A
Andris Zeila RESOLVED in r35364 dimir Great, CLOSED
Hide
dimir added a comment - - edited

(2) [S] Possible execute query error when unlinking a template.

If there were no applications to delete SQL DELETE operation is still called with SELECT statement from previous usage.

RESOLVED in r35365, please review

Andris Zeila added another check to avoid executing DBselect on empty ids set, please review r35373

dimir CLOSED

Show
dimir added a comment - - edited (2) [S] Possible execute query error when unlinking a template. If there were no applications to delete SQL DELETE operation is still called with SELECT statement from previous usage. RESOLVED in r35365, please review Andris Zeila added another check to avoid executing DBselect on empty ids set, please review r35373 dimir CLOSED
Hide
dimir added a comment -

DB patch successfully tested.

Show
dimir added a comment - DB patch successfully tested.
Hide
dimir added a comment - - edited

(3) [S] SQL error when unlinking a template without applications.

Proposed fix, RESOLVED in r35387.

Andris Zeila looks good, CLOSED

Show
dimir added a comment - - edited (3) [S] SQL error when unlinking a template without applications. Proposed fix, RESOLVED in r35387. Andris Zeila looks good, CLOSED
Hide
Christian Lahti added a comment -

Is there an available patch, or at least a list of affected files? I am running 2.0.5

Show
Christian Lahti added a comment - Is there an available patch, or at least a list of affected files? I am running 2.0.5
Hide
dimir added a comment - - edited

(4) [S] TODO. Test linking of templates that have linked templates. This should be possible when Frontend is ready.

Alexander Vladishev TESTED

dimir CLOSED

Show
dimir added a comment - - edited (4) [S] TODO. Test linking of templates that have linked templates. This should be possible when Frontend is ready. Alexander Vladishev TESTED dimir CLOSED
Hide
dimir added a comment -

Server side basically tested.

Show
dimir added a comment - Server side basically tested.
Hide
richlv added a comment -

Christian, this change won't be backported to 2.0

Show
richlv added a comment - Christian, this change won't be backported to 2.0
Hide
Pavels Jelisejevs added a comment -
Show
Pavels Jelisejevs added a comment - Specification available here https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-928
Hide
Alexander Vladishev added a comment - - edited

(5) [G] Cannot compile agent only

In file included from ../../../include/db.h:25:0,
                 from misc.c:22:
../../../include/zbxdb.h:179:1: error: unknown type name ‘DB_RESULT’
../../../include/zbxdb.h:180:1: error: unknown type name ‘DB_RESULT’
../../../include/zbxdb.h:182:1: error: unknown type name ‘DB_ROW’
../../../include/zbxdb.h:182:22: error: unknown type name ‘DB_RESULT’
In file included from misc.c:22:0:
../../../include/db.h:474:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:475:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:477:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:478:1: error: unknown type name ‘DB_ROW’
../../../include/db.h:478:17: error: unknown type name ‘DB_RESULT’
../../../include/db.h:528:43: error: unknown type name ‘DB_ROW’
make[3]: *** [misc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

#include "db.h" should be removed from misc.c module

Andris Zeila RESOLVED in r35507

Alexander Vladishev CLOSED

Show
Alexander Vladishev added a comment - - edited (5) [G] Cannot compile agent only
In file included from ../../../include/db.h:25:0,
                 from misc.c:22:
../../../include/zbxdb.h:179:1: error: unknown type name ‘DB_RESULT’
../../../include/zbxdb.h:180:1: error: unknown type name ‘DB_RESULT’
../../../include/zbxdb.h:182:1: error: unknown type name ‘DB_ROW’
../../../include/zbxdb.h:182:22: error: unknown type name ‘DB_RESULT’
In file included from misc.c:22:0:
../../../include/db.h:474:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:475:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:477:1: error: unknown type name ‘DB_RESULT’
../../../include/db.h:478:1: error: unknown type name ‘DB_ROW’
../../../include/db.h:478:17: error: unknown type name ‘DB_RESULT’
../../../include/db.h:528:43: error: unknown type name ‘DB_ROW’
make[3]: *** [misc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
#include "db.h" should be removed from misc.c module Andris Zeila RESOLVED in r35507 Alexander Vladishev CLOSED
Hide
Alexander Vladishev added a comment - - edited

(6) [S] Broken database upgrade:

 11403:20130509:095800.858 query [txnlev:1] [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)]
 11403:20130509:095800.859 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  syntax error at or near ")"
LINE 3: optional integer default '0' not null,PRIMARY KEY()
                                                          ^
 [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)]
 11403:20130509:095800.859 query [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)] failed, setting transaction as failed
 11403:20130509:095800.859 query [txnlev:1] [rollback;]

Support of primary keys was implemented in dev/ZBXNEXT-1633 branch. Please copy from here.

Andris Zeila RESOLVED in r35514

Alexander Vladishev CLOSED

Show
Alexander Vladishev added a comment - - edited (6) [S] Broken database upgrade:
 11403:20130509:095800.858 query [txnlev:1] [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)]
 11403:20130509:095800.859 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  syntax error at or near ")"
LINE 3: optional integer default '0' not null,PRIMARY KEY()
                                                          ^
 [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)]
 11403:20130509:095800.859 query [create table dbversion (
mandatory integer default '0' not null,
optional integer default '0' not null,PRIMARY KEY()
)] failed, setting transaction as failed
 11403:20130509:095800.859 query [txnlev:1] [rollback;]
Support of primary keys was implemented in dev/ZBXNEXT-1633 branch. Please copy from here. Andris Zeila RESOLVED in r35514 Alexander Vladishev CLOSED
Hide
Alexander Vladishev added a comment - - edited

(7) [S] DBpatch_02010071(): new table structure should be described in function.

For example:
dev/ZBXNEXT-1633/src/libs/zbxdbupgrade/dbupgrade.c: DBpatch_02010077()

Andris Zeila RESOLVED in r35516

Alexander Vladishev CLOSED

Show
Alexander Vladishev added a comment - - edited (7) [S] DBpatch_02010071(): new table structure should be described in function. For example: dev/ZBXNEXT-1633/src/libs/zbxdbupgrade/dbupgrade.c: DBpatch_02010077() Andris Zeila RESOLVED in r35516 Alexander Vladishev CLOSED
Hide
Pavels Jelisejevs added a comment -

Frontend ready for testing.

Show
Pavels Jelisejevs added a comment - Frontend ready for testing.
Hide
Eduards Samersovs added a comment - - edited

(12) Need to allow remove application which is used in web scenario. As we discussed.

Pavels Jelisejevs Frontend side resolved in r35829.
Eduards Samersovs CLOSED

Andris Zeila After additional discussion was decided to not remove applications with items. So server side reverted to r35830. CLOSED

Show
Eduards Samersovs added a comment - - edited (12) Need to allow remove application which is used in web scenario. As we discussed. Pavels Jelisejevs Frontend side resolved in r35829. Eduards Samersovs CLOSED Andris Zeila After additional discussion was decided to not remove applications with items. So server side reverted to r35830. CLOSED
Hide
Eduards Samersovs added a comment -

Frontend tested!

Show
Eduards Samersovs added a comment - Frontend tested!
Hide
Pavels Jelisejevs added a comment -

Available in 2.1.0 r35864.

Show
Pavels Jelisejevs added a comment - Available in 2.1.0 r35864.
Hide
dimir added a comment - - edited

(14) [F] Regression in trunk: cannot unlink a template from host (PostgreSQL):

pg_query(): Query failed: ERROR: column "ht" of relation "httptest" does not exist
LINE 1: UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applic...
^ [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512]
Error in query [UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applicationid BETWEEN '345' AND '355'] [ERROR: column "ht" of relation "httptest" does not exist
LINE 1: UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applic...
^]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → CProfile::delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512]
Error in query [DELETE FROM profiles WHERE idx='web.latest.toggle' AND (idx2 IN ('345','346','347','348','349','350','351','352','353','354','355'))] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → DB::delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512]
Error in query [DELETE FROM applications WHERE (applicationid IN ('345','346','347','348','349','350','351','352','353','354','355'))] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
SQL statement execution has failed "DELETE FROM applications WHERE (applicationid IN ('345','346','347','348','349','350','351','352','353','354','355'))"

Pavels Jelisejevs Fixed directly in trunk r36002. CLOSED.

Show
dimir added a comment - - edited (14) [F] Regression in trunk: cannot unlink a template from host (PostgreSQL): pg_query(): Query failed: ERROR: column "ht" of relation "httptest" does not exist LINE 1: UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applic... ^ [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512] Error in query [UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applicationid BETWEEN '345' AND '355'] [ERROR: column "ht" of relation "httptest" does not exist LINE 1: UPDATE httptest ht SET ht.applicationid=NULL WHERE ht.applic... ^] pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → CProfile::delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512] Error in query [DELETE FROM profiles WHERE idx='web.latest.toggle' AND (idx2 IN ('345','346','347','348','349','350','351','352','353','354','355'))] [ERROR: current transaction is aborted, commands ignored until end of transaction block] pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [hosts.php:462 → CAPIObject->update() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->update() → CHost->massUpdate() → CHost->massRemove() → CHostGeneral->massRemove() → CHostGeneral->unlink() → CApplication->delete() → CApplicationManager->delete() → DB::delete() → DBexecute() → pg_query() in /home/vl/svn/zabbix/trunk/frontends/php/include/db.inc.php:512] Error in query [DELETE FROM applications WHERE (applicationid IN ('345','346','347','348','349','350','351','352','353','354','355'))] [ERROR: current transaction is aborted, commands ignored until end of transaction block] SQL statement execution has failed "DELETE FROM applications WHERE (applicationid IN ('345','346','347','348','349','350','351','352','353','354','355'))" Pavels Jelisejevs Fixed directly in trunk r36002. CLOSED.
Hide
richlv added a comment - - edited

(15) had 3 templates with same application, linked all 3 to a single host. in the application list for the host, all 3 templates are listed as parents.
deleted application on one of the templates - it was also deleted on the host. should not be

Pavels Jelisejevs RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-928.
Eduards Samersovs CLOSED

Show
richlv added a comment - - edited (15) had 3 templates with same application, linked all 3 to a single host. in the application list for the host, all 3 templates are listed as parents. deleted application on one of the templates - it was also deleted on the host. should not be Pavels Jelisejevs RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-928. Eduards Samersovs CLOSED
Hide
Pavels Jelisejevs added a comment -

Fixed in 2.1.0 r36059.

CLOSED.

Show
Pavels Jelisejevs added a comment - Fixed in 2.1.0 r36059. CLOSED.

People

Vote (58)
Watch (34)

Dates

  • Created:
    Updated:
    Resolved: