Last active
July 11, 2018 22:17
-
-
Save rossnelson/35241d54ebd8ff5b0d137348b21ee046 to your computer and use it in GitHub Desktop.
stashed hab troubleshooting queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { $.message = "Commands dequeued for 9a9408d0-7944-11e8-838b-755f39858ca5*" } | |
| { $.message = "Queuing Commands" && $.meta.device_id = 7648e670-794a-11e8-a713-ffdab1da4ab3 } | |
| { $.message = "Started GET \"/integrations/devices/*/commands*" && $.customer = "hab-plaza*" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.getCollection('bre_events').aggregate([ | |
| { $match: { eventName: "device_updated", eventStartDate: { $gt: ISODate("2018-07-10T19:20:00.000Z") } } }, | |
| { $unwind: "$parameters.device.additional_properties" }, | |
| { $project: { | |
| id: "$parameters.device._id", | |
| date: "$eventStartDate", | |
| make: "$parameters.device.make", | |
| model: "$parameters.device.model", | |
| name: "$parameters.device.name", | |
| key: "$parameters.device.additional_properties.key", | |
| value: "$parameters.device.additional_properties.value.value" | |
| } }, | |
| { $match: { id: "fe63f400-7ef9-11e8-b670-e9fb353df5f2", "key": /^cool_target$/ } }, | |
| { $limit: 15 } | |
| ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment