Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. SET NAMES 'utf8'
  2. SET CHARACTER SET 'utf8'
  3. SET COLLATION_CONNECTION = 'utf8_unicode_ci'
  4. SELECT `config_name`,`config_value` FROM `config`
  5. select * from graph_types
  6. SELECT DISTINCT(`os`) FROM `devices`
  7. DELETE FROM `session` WHERE `session_expiry` < '1503996270'
  8. SELECT * FROM devices_perms WHERE user_id = '5351'
  9. SELECT * FROM ports_perms WHERE user_id = '5351'
  10. SELECT * FROM bill_perms WHERE user_id = '5351'
  11. SELECT * FROM `plugins` WHERE `plugin_active` = '1'
  12. SELECT service_status, count(service_status) as count FROM services GROUP BY service_status
  13. SELECT COUNT(port_id) FROM `ports` WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND `ignore` = '0'
  14. SELECT COUNT(*) FROM `links` AS `L`, `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` AND `L`.`local_device_id` = `D`.`device_id`
  15. SELECT * FROM device_groups ORDER BY name
  16. SELECT 1 from `packages` LIMIT 1
  17. SELECT `type`,COUNT(`type`) AS total_type FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `type` ORDER BY `type`
  18. SELECT COUNT(*) FROM ports AS I, devices AS D, devices_perms AS P WHERE I.`deleted` = '0' AND P.`user_id` = '5351' AND P.`device_id` = D.`device_id` AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')
  19. SELECT COUNT(*) FROM ports AS I, devices AS D, devices_perms AS P WHERE I.`deleted` = '0' AND P.`user_id` = '5351' AND P.`device_id` = D.`device_id` AND I.`device_id` = D.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')
  20. SELECT * FROM `ports` AS P, `devices` as D WHERE P.`deleted` = '1' AND D.device_id = P.device_id
  21. SELECT sensor_class,COUNT(sensor_id) AS c FROM sensors GROUP BY sensor_class ORDER BY sensor_class
  22. SELECT `sensor_class` FROM `wireless_sensors` GROUP BY `sensor_class`
  23. SELECT DISTINCT(`app_type`) AS `app_type` FROM `applications` ORDER BY `app_type`
  24. SELECT COUNT(bgpPeer_id) from `bgpPeers` LEFT JOIN devices AS D ON bgpPeers.device_id=D.device_id WHERE D.device_id IS NOT NULL
  25. SELECT COUNT(ospf_instance_id) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'
  26. SELECT COUNT(cef_switching_id) from `cef_switching`
  27. SELECT COUNT(vrf_id) from `vrfs`
  28. SELECT `C`.`id`,`C`.`device_id`,`C`.`type`,`C`.`label`,`C`.`status`,`C`.`disabled`,`C`.`ignore`,`C`.`error`,`CP`.`attribute`,`CP`.`value` FROM `component` as `C` LEFT JOIN `component_prefs` as `CP` on `C`.`id`=`CP`.`component` WHERE ( `type` = 'Cisco-OTV' )
  29. SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` LEFT JOIN `devices_perms` AS `DP` ON `devices`.`device_id` = `DP`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE 1 AND `alerts`.`state` NOT IN (0,1) AND `DP`.`user_id`='5351'
  30. select count(notifications.notifications_id) from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = '5351')
  31. select count(notifications.notifications_id) from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1
  32. SELECT `os` FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `os` ORDER BY `os`
  33. SELECT `version` FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `version` ORDER BY `version`
  34. SELECT `hardware` FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `hardware` ORDER BY `hardware`
  35. SELECT `features` FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `features` ORDER BY `features`
  36. SELECT location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '5351' GROUP BY location ORDER BY location
  37. SELECT `type` FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = '5351' AND `P`.`device_id` = `D`.`device_id` GROUP BY `type` ORDER BY `type`
  38. SELECT COUNT(*) FROM `devices` WHERE `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute) AND `ignore` = 0 AND `disabled` = 0 AND status = 1
  39. SELECT * FROM `notifications` WHERE `severity` > 1
  40. 39 total SQL queries run.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement