A source is the name TrueSight Pulse uses for anything that sends data. Sources are tracked each time a piece of data is sent. For instance each time a meter sends in data the system will track the meter name as a source. Using this data, TrueSight Pulse can easily filter display data based on an easy to use query language.
Additionally, meter metadata, tags and properties, along with AWS tags are added to the source definition as queryable source tags.
Source queries is a feature which allows TrueSight Pulse users to query sources. There are a couple basic rules to keep in mind when writing a Source Query:
- Query identifiers are quering the name of the source unless otherwise specified
- Results will only include sources that have been active in the last 24 hours by default
Exact Match Query:
To find a specific source that must be an exact match, surround the search string with double quotes:
This query returns a source that has the name "service-24.prod.domain.com".
By default, queries are implied substring searches.
This query returns all sources that contain "prod" in the source name. By default, only sources that have been active in the last 24 hours are included in the results. Matches would include:
This query is equivalent to the previous query. The wildcards are explicitly defined and has the same effect of returning all sources that contain the string "prod".
This query searches for "sources that start with" and would match:
This query searches for "sources that end with" and would match:
This query would match:
Relative Active Time Queries:
This query will return all sources that have been active (sent data) in the last 2 hours.
Relative Active Time w/ Comparisons:
last > 2h
This query is the equivalent to the previous example.
Binary Comparison "AND" Queries:
*prod* && last: 2h
This query will return only the matching sources that matched in our simple wildcard query example earlier which have sent data within the last 2 hours.
Alternatively, you can use the word "AND" which has the exact same effect as "&&":
*prod* and last: 2h *prod* AND last: 2h
Binary Comparison "OR" Queries:
*prod* || last: 2h
This query will return the matching sources from our simple wildcard query example as well as any other sources that have been active within the last 2 hours.
Alternatively, you can use the word "OR" which has the exact same effect as "||":
*prod* or last: 2h *prod* OR last: 2h
Chained Comparison Queries:
*prod* || *staging* && last: 24h
This query is effectively processed like ((prod || staging) && last: 24h) due to typical order of operations.