I tried to create a new group and filter for specific software, like the SSH Server group is doing. Since I didn't found the right table per assist, I used the ssh server query and modified them. But as I submitted the query, I got:
Message: Undefined property: stdClass::$column_order_8
Line Number: 82
Error Number: 1136
Column count doesn't match value count at row 1
INSERT INTO oa_group_sys (system_id, group_id) SELECT distinct(system.system_id) FROM system LEFT JOIN software ON (system.system_id = software.system_id AND software.current = 'y') WHERE software.name != '1234' AND system.man_status = 'production'
Line Number: 175
Thanks - I think this error is misleading. The Group definition will be shown after submitted (list groups). So I assume that the self defined SQL query simply fails, but works later per Groups.
But I have another, maybe dumb, question - how can I filter for software which is not installed on the systems? I tried = 'apache', or IS NOT - but I always the systems who have this software installed..
Try this in a report definition. Note the software package here is git and it's in the query twice.
SELECT system.system_id, system.hostname, software.name, software.version, IF(software.name = 'git', 'yes', 'no') AS installed FROM system LEFT JOIN software ON (system.system_id = software.system_id AND software.name = 'git' AND software.current = 'y') JOIN oa_group_sys ON (system.system_id = oa_group_sys.system_id AND oa_group_sys.group_id = @group) GROUP BY system.system_id ORDER BY software.name, software.version;
Thanks - but where I can add those queries? Per Add Group, too? Edit reports give me a XML ..
Put it in a report definition. It's an XML file. Documentation available here https://community.opmantek.com/display/OA/How+to+Create+a+Query and here https://community.opmantek.com/display/OA/How+to+create+a+Query+definition
thanks, this was helpful.
Please post your complete XML definition and I'll fix it
Powered by a free Atlassian Confluence Open Source Project License granted to Opmantek. Evaluate Confluence today.