Open-audit 自订栏位查询

最近拜读节省哥文章,架设了公司需要的资产管理系统,目前完成自订栏位后,基本的资料已经足够汇出资料给稽核单位,再来就是深入点的管理了。
.................
查询内建範本列表Manage => Queries => List Querise

点选工作站的範本出来看


这边列出了NAME IP MANUFACTURER MODEL SERIAL FROM FACTOR MEMORY PROCESSOR与SQL查询语法,可参考这些语法改成自己想要的栏位列表

原始WorkStation SQL语法
……………………..
SELECT system.id AS system.id, system.icon AS system.icon, system.type AS system.type, system.name AS system.name, system.domain AS system.domain, system.ip AS system.ip, system.manufacturer AS system.manufacturer, system.model AS system.model, system.serial AS system.serial, system.os_family AS system.os_family, system.memory_count AS system.memory_count, system.form_factor AS system.form_factor, processor.description AS processor.description FROM system LEFT JOIN processor ON (processor.system_id = system.id AND processor.current = 'y') WHERE @filter AND system.type = 'computer' AND system.class != 'server' AND system.class != 'hypervisor' ORDER BY system.name
……………………..

自己编修后 主要条件改为
system.type = 'computer' AND system.form_factor = 'desktop' AND system.class != 'server' AND system.class != 'hypervisor' AND system.class != 'virtual server'
只秀COMPUTER与DESKTOP的设备
……………………..
SELECT system.id AS system.id, system.icon AS system.icon, system.type AS system.type, system.name AS system.name, system.domain AS system.domain, system.ip AS system.ip, system.manufacturer AS system.manufacturer, system.model AS system.model, system.serial AS system.serial, system.os_family AS system.os_family, system.memory_count AS system.memory_count, system.form_factor AS system.form_factor, processor.description AS processor.description FROM system LEFT JOIN processor ON (processor.system_id = system.id AND processor.current = 'y') WHERE @filter AND system.type = 'computer' AND system.form_factor = 'desktop' AND system.class != 'server' AND system.class != 'hypervisor' AND system.class != 'virtual server' ORDER BY system.ip 

自订查询栏位 Manage => Queries => Create Queries

查询内建範本列表Manage => Queries => List Querise 多出了刚新增的查询,点绿色PLAY键可列表

符合刚刚设定条件的列表资讯,再点选右上角的Export即可汇出报表


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章