2020 年 1 月
« 12 月    
 12345
6789101112
13141516171819
20212223242526
2728293031  

彙整

Open-audit 自訂欄位查詢方式

查詢內建範本列表Manage => Queries => List Querise

clip_image002

點選工作站的範本出來看

clip_image004

這邊列出了NAME IP MANUFACTURER MODEL SERIAL FROM FACTOR MEMORY PROCESSOR與SQL查詢語法,可參考這些語法改成自己想要的欄位列表

clip_image006

原始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

clip_image008

clip_image010

查詢內建範本列表Manage => Queries => List Querise 多出了剛新增的查詢,點綠色PLAY鍵可列表

clip_image012

符合剛剛設定條件的列表資訊,再點選右上角的Export即可匯出報表

clip_image014

讀者也會看的其它文章:

    Comments are closed.