表以及视图
select
nc.alias AS alias,
nc.contact_id AS contact_id,
no.name1 AS host_name,
hg.alias AS hostgroup_name,
no.name2 AS monitor_service,
nn.start_time AS start_time,
nn.end_time AS end_time,
nn.output AS output
from
nagios_contactnotifications ncn,
nagios_contacts nc,
nagios_notifications nn,
nagios_objects no,
nagios_hostgroup_members hm,
nagios_hostgroups hg,
nagios_services ns
where
ncn.notification_id=nn.notification_id
and ncn.contact_object_id=nc.contact_object_id
and no.object_id=ns.service_object_id
and nn.object_id=no.object_id
and hm.host_object_id=ns.host_object_id
and hg.hostgroup_id=hm.hostgroup_id order by nn.start_time desc
阅读(487) | 评论(1) | 转发(0) |