Pagina 1 di 1

[RISOLTO] Query Wapt: la macchina non ha un determinato software

Pubblicato: 20 settembre 2023 - 15:33
di DelDemone
Ciao!

Ho appena scoperto WAPT Reporting.
Vorrei scrivere una query che restituisca tutti i nomi dei computer server che non hanno un software specifico installato.

Ammetto di averci provato per diverse ore. :?

Potreste fornirmi un esempio di query che soddisfi le mie esigenze? idea:

Re: Richiesta Wapt

Pubblicato: 20 settembre 2023 - 16:59
di blemoigne
Buongiorno,

Ecco un esempio per 7-zip:

Codice: Seleziona tutto

select
hosts.computer_name
from hosts
where
0 = (select count(hostsoftwares.host_id)
from hostsoftwares
where hostsoftwares.name ilike '7-zip%%'
and hosts.uuid=hostsoftwares.host_id )
order by hosts.computer_name asc

Potremmo aggiungere una condizione con nomi di macchine che iniziano con srv:

Codice: Seleziona tutto

select
hosts.computer_name
from hosts
where
0 = (select count(hostsoftwares.host_id)
from hostsoftwares
where hostsoftwares.name ilike '7-zip%%'
and hosts.uuid=hostsoftwares.host_id ) and
hosts.computer_name ilike 'srv%%'
order by hosts.computer_name asc

Distinti saluti,

Bertrand

Re: Richiesta Wapt

Pubblicato: 22 febbraio 2024 - 10:38
di FlavienL
Buongiorno,

Grazie mille, l'ho adattato leggermente alle nostre esigenze:

Codice: Seleziona tutto

select
hosts.computer_name,
last_seen_on
from hosts
where
0 = (select count(hostsoftwares.host_id)
from hostsoftwares
where hostsoftwares.name ilike 'APPLI TATA'
and hosts.uuid=hostsoftwares.host_id ) and not
hosts.computer_name ilike 'l%%'
order by last_seen_on desc
Funziona perfettamente, grazie ancora
Flavien