
#DBEAVER STOP QUERY MANUAL#
See also: MySQL manual on pattern matching. DBeaver is a universal database administration tool that can be used to manage all kinds of relational and NoSQL databases. This will match "poller01", "poller02", and "pollerX" but not "abc_poller" or "1poller" If you want to find a service that includes a specific string, you can do wildcard matching with the "LIKE" operator: WHERE service_description = 'Host latency' AND host_name LIKE 'poller%' WHERE service_description = 'Host latency' AND host_name = 'poller02'

If you want to show data for only a specific service under a specific host, the end of the query should look something like: (.) To exclude data points related to services and only show hosts, you can filter by: WHERE service_description = '' If you want to show more, change the "LIMIT". It will, however, list all of the 100 newest points in the database. This query will make the data points somewhat more understandable to the reader, as it will interpret the Nagios event types and state codes for you.

Since this query is fairly long, you may want to edit it in a separate text editor before pasting it into your terminal, if you are not using another front-end to run queries against your database. WHEN event_type = 103 THEN 'PROCESS SHUTDOWN' WHEN event_type = 100 THEN 'PROCESS START' WHEN event_type = 1104 THEN 'DOWNTIME STOP' Attached is a screenshot: running a Database Task on dbeaver 21. WHEN event_type = 1103 THEN 'DOWNTIME START' run multiple files with Tasks in dbeaver 21.0: Click menu Database -> Tasks -> Create new task Specify task name Choose the connection Select files to run (I had two to exclude, underlined with red) Run the task from same menu and watch dbeaver iterate the code for you. WHEN event_type = 1001 THEN 'FLAPPING STOPPED' WHEN event_type = 1000 THEN 'FLAPPING STARTED' To get a MySQL prompt on the command line, run the following command to select the "merlin" database where report data resides: # mysql -D merlin Example query SELECT id,ĪND event_type = 701 THEN 'SERVICE WARNING'ĪND event_type = 801 THEN 'HOST UNREACHABLE'ĪND event_type = 701 THEN 'SERVICE CRITICAL'ĪND event_type = 701 THEN 'SERVICE UNKNOWN' Just make sure you stick to "SELECT" queries, do not make any changes to the database unless you have proper backups in place and feel comfortable with restoring them. serge-rider added this to the 5.2.4 milestone on Oct 3, 2018.

You can run queries directly from the command line, or you can use third party tools like DBeaver. serge-rider added the feature request label on Oct 3, 2018.
#DBEAVER STOP QUERY HOW TO#
For information how to synchronize the report_data table with your log files, see: Synchronize and reinsert report data.
