diff --git a/.travis.yml b/.travis.yml index bbfdf3f1a..b4c43bbf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,10 @@ notifications: on_success: change on_failure: always on_start: never + slack: + rooms: + secure: mqHrQAw8feDH8e8+/gV8C1dbeC3e3tkS/AGx9XTtUoCVbY45C0X6KRYaSpK9H1WNjY7AjBnrEjsvQlivhXKIp41FQBhnief1t+0zGtnkwtQiRumWOyoo2uN+BNVE+fE8W0QyasL/SjarBFAqJkbQPH5EiRxcil8Wcuk2mE44a3kRL+sE67rPqjXSvc5t3N5kupziIMW90dxpeV584t3CS5VfPbrwLdrmZtDOgZj6ijsmM41N6+KXl+44LKK0bXApGD4WWX7iESivzjM+mOTVUhO7o17vpQ7JwG3EXymVRxUnIyANWI0KYzQGNwWEl1XWBrkw4/oGW/xOJK9nsW2EkoBnUjERk9xYPzte4RQO2IpnLrBLCWG0HL4NBKfbftJLtUxQFXhzIQ7MqYjwCKrSSK23eNl/qLl+8VkaNBa0hutGBPWYG2KF/SOMu3rPDGGzT+LD/atbAnm/m6M3p2XkR7vHHUgfwZ10vt2HLvpElK6ScT0OhZ1wNtfRnms7HJO44rp4bZMyJURU6wkEMeNoOOrfSVGIkwbXAJja2EGFVBcIeOTJpQBBxWnRCyEC2BmxX2rjuiBibGke7VpmSOUadlQxG7DotspfqzNy93VulI3GnwkZr3PqwBp8/Ce4v68uk/WdOx2Y5ug98CoBqF17XpM2I21wSJxAKu5B1zRgL5I= + on_pull_requests: false before_install: - sudo apt-get update - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce @@ -23,7 +27,6 @@ before_script: - gem install fpm script: - make packages - - make docker_image before_deploy: - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" deploy: @@ -38,16 +41,28 @@ deploy: skip_cleanup: true on: tags: true - condition: "$TRAVIS_NODE_VERSION = 8" - provider: script - script: make docker_push + script: + - make docker_feature_image GIT_BRANCH="${TRAVIS_BRANCH////-}" + skip_cleanup: true + on: + all_branches: true + condition: $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH =~ ^(feature|hotfix).*$ + - provider: script + script: + - make docker_develop_image + skip_cleanup: true + on: + branch: develop + - provider: script + script: + - make docker_latest_image skip_cleanup: true on: branch: master - condition: "$TRAVIS_NODE_VERSION = 8" - provider: script - script: make docker_push_release + script: + - make docker_release_image skip_cleanup: true on: tags: true - condition: "$TRAVIS_NODE_VERSION = 8" diff --git a/Makefile b/Makefile index 38dfa38a4..7bce4bad8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ +GIT_BRANCH := "unknown" +GIT_HASH := $(shell git log --pretty=format:%H -n 1) +GIT_HASH_SHORT := $(shell echo "${GIT_HASH}" | cut -c1-6) GIT_TAG := $(shell git describe --always --tags --abbrev=0 | tail -c+2) GIT_COMMIT := $(shell git rev-list v${GIT_TAG}..HEAD --count) +FEATURE_VERSION := ${GIT_TAG}-${GIT_BRANCH} +DEVELOP_VERSION := nightly-${GIT_HASH_SHORT} VERSION := ${GIT_TAG}.${GIT_COMMIT} VENDOR := "SKB Kontur" URL := "https://github.com/moira-alert/web2.0" @@ -63,14 +68,22 @@ deb: .PHONY: packages packages: clean build tar rpm deb -.PHONY: docker_image -docker_image: - docker build -t moira/web2:${VERSION} -t moira/web2:latest . +.PHONY: docker_feature_image +docker_feature_image: + docker build -t moira/web2:${FEATURE_VERSION} . + docker push moira/web2:${FEATURE_VERSION} -.PHONY: docker_push -docker_push: +.PHONY: docker_develop_image +docker_develop_image: + docker build -t moira/web2:${DEVELOP_VERSION} . + docker push moira/web2:${DEVELOP_VERSION} + +.PHONY: docker_latest_image +docker_latest_image: + docker build -t moira/web2:latest . docker push moira/web2:latest -.PHONY: docker_push_release -docker_push_release: +.PHONY: docker_release_image +docker_release_images: + docker build -t moira/web2:${VERSION} . docker push moira/web2:${VERSION} diff --git a/README.md b/README.md index 77041804a..5666a2134 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ After cloning repo make sure you have installed all dependencies by running `yar All files will be prepared in **dist** folder. -### Developing +## Developing `yarn start` @@ -33,3 +33,11 @@ Starts [Storybook](https://storybook.js.org) on port 9001. `yarn flow` Starts [Flow](https://flow.org) server for checking types. You can also run `yarn flow.status` for status, `yarn flow.check` for errors report, `yarn flow.coverage.html` to export html report with cute UI. + +## Contributing + +Put issues [in main repo](https://github.com/moira-alert/moira/issues), please. Even if you think, that your issue only about web interface. In many cases that's no so. Thank you! + +--- + +[More about Moira](https://github.com/moira-alert/moira/blob/master/README.md) diff --git a/fakeapi/db.json b/fakeapi/db.json index 8f5671d00..758817c65 100644 --- a/fakeapi/db.json +++ b/fakeapi/db.json @@ -1,3373 +1,3964 @@ { - "config": { - "contacts": [ - { - "type": "email", - "validation": "^.+@.+\\..+$" - }, - { - "type": "phone", - "validation": "^9\\d{9}$", - "title": "kontur sms", - "help": "Phone number format 9*********" - }, - { - "type": "pushover", - "validation": "", - "title": "pushover user key" - }, - { - "type": "slack", - "validation": "^[@#][a-zA-Z0-9-_]+", - "title": "slack #channel / @user" - }, - { - "type": "telegram", - "validation": "", - "title": "#channel, @username, group", - "help": "Required to grant [@KonturMoiraBot](https://t.me/KonturMoiraBot) admin privileges for channels,\nor `/start` command in groups and personal chats" - }, - { - "type": "twilio voice", - "validation": "^\\+79\\d{9}$", - "title": "twilio voice", - "help": "Phone number format +79*********" - } - ], - "supportEmail": "devopsteam@skbkontur.ru" - }, - "user": { - "login": "testuser" - }, - "tag": { - "list": [ - "critical", - "devops", - "frontend", - "backend", - "test", - "errors", - "warnings", - "archive" - ] - }, - "settings": { - "login": "testuser", - "contacts": [ - { - "type": "phone", - "user": "testuser", - "value": "+70981234567", - "id": "0ef1df0c-7187-4eb6-8a1f-6ee2c296eac8" - }, - { - "type": "telegram", - "user": "testuser", - "value": "@testuser", - "id": "728b26d9-1947-4856-a285-145923fd9bcb" - }, - { - "type": "email", - "user": "testuser", - "value": "testuser@skbkontur.ru", - "id": "06a684b5-53d4-4cae-8bbf-14acee20198d" - } - ], - "subscriptions": [ - { - "sched": { - "endOffset": 1439, - "days": [ - { - "enabled": true, - "name": "Mon" - }, + "config": { + "contacts": [ { - "enabled": true, - "name": "Tue" + "type": "email", + "validation": "^.+@.+\\..+$" }, { - "enabled": true, - "name": "Wed" + "type": "phone", + "validation": "^9\\d{9}$", + "title": "kontur sms", + "help": "Phone number format 9*********" }, { - "enabled": true, - "name": "Thu" + "type": "pushover", + "validation": "", + "title": "pushover user key" }, { - "enabled": true, - "name": "Fri" + "type": "slack", + "validation": "^[@#][a-zA-Z0-9-_]+", + "title": "slack #channel / @user" }, { - "enabled": true, - "name": "Sat" + "type": "telegram", + "validation": "", + "title": "#channel, @username, group", + "help": "Required to grant [@KonturMoiraBot](https://t.me/KonturMoiraBot) admin privileges for channels,\nor `/start` command in groups and personal chats" }, { - "enabled": true, - "name": "Sun" + "type": "twilio voice", + "validation": "^\\+79\\d{9}$", + "title": "twilio voice", + "help": "Phone number format +79*********" } - ], - "startOffset": 0, - "tzOffset": -300 - }, - "tags": [ - "devops", - "frontend", - "backend" ], - "throttling": true, + "supportEmail": "devopsteam@skbkontur.ru" + }, + "user": { + "login": "testuser" + }, + "tag": { + "list": [ + "critical", + "devops", + "frontend", + "backend", + "test", + "errors", + "warnings", + "archive" + ] + }, + "settings": { + "login": "testuser", "contacts": [ - "0ef1df0c-7187-4eb6-8a1f-6ee2c296eac8" + { + "type": "phone", + "user": "testuser", + "value": "+70981234567", + "id": "0ef1df0c-7187-4eb6-8a1f-6ee2c296eac8" + }, + { + "type": "telegram", + "user": "testuser", + "value": "@testuser", + "id": "728b26d9-1947-4856-a285-145923fd9bcb" + }, + { + "type": "email", + "user": "testuser", + "value": "testuser@skbkontur.ru", + "id": "06a684b5-53d4-4cae-8bbf-14acee20198d" + } ], - "enabled": false, - "user": "testuser", - "id": "85b14755-6cbe-429d-860c-21f7c01569c2" - }, - { - "sched": { - "endOffset": 1439, - "days": [ + "subscriptions": [ { - "enabled": true, - "name": "Mon" + "sched": { + "endOffset": 1439, + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "startOffset": 0, + "tzOffset": -300 + }, + "tags": ["devops", "frontend", "backend"], + "throttling": true, + "contacts": ["0ef1df0c-7187-4eb6-8a1f-6ee2c296eac8"], + "enabled": false, + "user": "testuser", + "id": "85b14755-6cbe-429d-860c-21f7c01569c2" }, { - "enabled": true, - "name": "Tue" + "sched": { + "endOffset": 1439, + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "startOffset": 0, + "tzOffset": -300 + }, + "tags": ["errors", "warnings"], + "throttling": true, + "contacts": ["728b26d9-1947-4856-a285-145923fd9bcb"], + "enabled": true, + "user": "testuser", + "id": "ad1c71aa-9f8b-4d29-b8ac-cd76c6f7b4c9" }, { - "enabled": true, - "name": "Wed" + "sched": { + "endOffset": 1439, + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "startOffset": 0, + "tzOffset": -300 + }, + "tags": ["critical", "devops", "frontend", "backend", "test"], + "throttling": false, + "contacts": ["06a684b5-53d4-4cae-8bbf-14acee20198d"], + "enabled": true, + "user": "testuser", + "id": "b2a37dcf-a347-4128-b53b-c13c5c5f0c08" }, { - "enabled": true, - "name": "Thu" + "sched": { + "endOffset": 1439, + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "startOffset": 0, + "tzOffset": -300 + }, + "tags": ["devops", "frontend"], + "throttling": false, + "contacts": ["06a684b5-53d4-4cae-8bbf-14acee20198d"], + "enabled": false, + "user": "testuser", + "id": "9f1ce01c-2de5-4324-b1fb-bc38140e585f" + } + ] + }, + "triggers": { + "page": 0, + "size": 5, + "total": 5, + "list": [ + { + "id": "f96c5608-bd00-4ea2-abd5-be677cdf7e03", + "name": "12321", + "targets": [ + "aliasByNode(Egais.Api.Front.Controllers.Time.*.*.*.*.p95,5, 7, 8)" + ], + "warn_value": 11111111111, + "error_value": 22222222222, + "tags": ["devops"], + "ttl_state": "NODATA", + "ttl": 600, + "sched": { + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": ["Egais.Api.Front.Controllers.Time.*.*.*.*.p95"], + "trigger_type": "rising", + "throttling": 0, + "last_check": { + "metrics": { + "EG-APP-01.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Billing.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cards.CardsCount": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cards.List": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashboxes.List": { + "event_timestamp": 1504457162, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.GoodsProcessings.InProcess": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.News.Check": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504455422, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ReleaseVersion.Run": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalCalendar.GetToday": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504570, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504630, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreContractors.FindAll": { + "event_timestamp": 1504457890, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreWayBills.Find": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Billing.Check": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.BusinessStatistics.WritePrintCardsEvent": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.CardsCount": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashboxes.List": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.MarkAsSeen": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.GoodsProcessings.InProcess": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.News.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.ProcessCard": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProdutcsSearch.Search": { + "event_timestamp": 1504444088, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ReleaseVersion.Run": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.ReadDay": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalCalendar.GetInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.MarkSeenBeerActsInJup": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.FindAll": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreWayBills.Find": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.About.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + } + }, + "score": 104000, + "state": "OK", + "timestamp": 1504511501 + }, + "is_remote": false }, { - "enabled": true, - "name": "Fri" + "id": "b562ca35-5f48-40f2-91de-4078a237c227", + "name": "Front", + "targets": [ + "aliasByNode(Egais.Api.Front.Controllers.Time.*.*.*.*.count, 5, 7, 8)" + ], + "warn_value": 10000, + "error_value": 20000, + "tags": ["frontend"], + "ttl_state": "NODATA", + "ttl": 600, + "sched": { + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": ["Egais.Api.Front.Controllers.Time.*.*.*.*.count"], + "trigger_type": "rising", + "throttling": 0, + "last_check": { + "metrics": { + "EG-APP-01.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Billing.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cards.CardsCount": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504101679 + }, + "EG-APP-01.Cards.List": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashboxes.List": { + "event_timestamp": 1504457162, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504104380 + }, + "EG-APP-01.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504111583 + }, + "EG-APP-01.GoodsProcessings.InProcess": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.News.Check": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504122385 + }, + "EG-APP-01.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504455422, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ReleaseVersion.Run": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504187187 + }, + "EG-APP-01.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalCalendar.GetToday": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504570, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504630, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreContractors.FindAll": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": true, + "timestamp": 1504510781, + "maintenance": 1504705590 + }, + "EG-APP-01.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504101692 + }, + "EG-APP-01.StoreWayBills.Find": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504104394 + }, + "EG-APP-01.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Billing.Check": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504111597 + }, + "EG-APP-02.BusinessStatistics.WritePrintCardsEvent": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.CardsCount": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashboxes.List": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504111599 + }, + "EG-APP-02.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504122402 + }, + "EG-APP-02.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781, + "maintenance": 1504187203 + }, + "EG-APP-02.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.MarkAsSeen": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.GoodsProcessings.InProcess": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.News.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.ProcessCard": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProdutcsSearch.Search": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": true, + "timestamp": 1504510781, + "maintenance": 1504705573 + }, + "EG-APP-02.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ReleaseVersion.Run": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.ReadDay": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalCalendar.GetInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.MarkSeenBeerActsInJup": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.FindAll": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreWayBills.Find": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.About.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + } + }, + "score": 104000, + "state": "OK", + "timestamp": 1504511501 + }, + "is_remote": true }, { - "enabled": true, - "name": "Sat" + "id": "351de571-015f-40ff-b16e-8ca57585b4e8", + "name": "Devops processes uptime DiTrace", + "targets": [ + "aliasByNode(DevOps.system.*ditrace*.process.*.uptime, 2, 4)" + ], + "warn_value": 0.001, + "error_value": 0, + "tags": ["devops", "nodata"], + "ttl_state": "NODATA", + "ttl": 600, + "sched": { + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": ["DevOps.system.*ditrace*.process.*.uptime"], + "trigger_type": "falling", + "throttling": 0, + "last_check": { + "metrics": { + "ditrace-lt.ditrace": { + "event_timestamp": 1503992566, + "state": "OK", + "suppressed": true, + "timestamp": 1504511381, + "value": 5359481, + "maintenance": 1504002302 + }, + "ditrace-lt.elasticsearch": { + "event_timestamp": 1503992386, + "state": "OK", + "suppressed": true, + "timestamp": 1504511381, + "value": 11824960, + "maintenance": 1504520708 + }, + "ditrace-lt.nginx": { + "event_timestamp": 1503992566, + "state": "OK", + "suppressed": true, + "timestamp": 1504511381, + "value": 35981206, + "maintenance": 1504521622 + }, + "vm-ditrace1.ditrace": { + "event_timestamp": 1503992299, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 602862 + }, + "vm-ditrace1.elasticsearch": { + "event_timestamp": 1503992400, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 5439035 + }, + "vm-ditrace1.nginx": { + "event_timestamp": 1503992299, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 27195168 + }, + "vm-ditrace2.ditrace": { + "event_timestamp": 1503992700, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 602859 + }, + "vm-ditrace2.elasticsearch": { + "event_timestamp": 1503992299, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 5439074 + }, + "vm-ditrace2.nginx": { + "event_timestamp": 1503484033, + "state": "NODATA", + "suppressed": false, + "timestamp": 1503496225 + }, + "vm-ditrace3.ditrace": { + "event_timestamp": 1503486527, + "state": "NODATA", + "suppressed": false, + "timestamp": 1503496225, + "maintenance": 1504100565 + }, + "vm-ditrace3.elasticsearch": { + "event_timestamp": 1503486527, + "state": "NODATA", + "suppressed": false, + "timestamp": 1503496225, + "maintenance": 1504118563 + }, + "vm-ditrace3.nginx": { + "event_timestamp": 1503484033, + "state": "NODATA", + "suppressed": false, + "timestamp": 1503496225, + "maintenance": 1504701757 + }, + "vm-ditrace4.ditrace": { + "event_timestamp": 1503992400, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 602189 + }, + "vm-ditrace4.elasticsearch": { + "event_timestamp": 1503992299, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 5824196 + }, + "vm-ditrace5.ditrace": { + "event_timestamp": 1503992845, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 509899 + }, + "vm-ditrace5.elasticsearch": { + "event_timestamp": 1503992700, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 1858776 + }, + "vm-ditrace6.ditrace": { + "event_timestamp": 1503992386, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 1213346 + }, + "vm-ditrace6.elasticsearch": { + "event_timestamp": 1503992359, + "state": "OK", + "suppressed": false, + "timestamp": 1504511381, + "value": 5796604 + } + }, + "score": 4000, + "state": "OK", + "timestamp": 1504511501 + }, + "is_remote": false }, { - "enabled": true, - "name": "Sun" + "id": "f08977e6-bfcd-4ca4-8e4a-5b3ffc56284b", + "name": "focus351 Elasticsearch cluster status", + "desc": "", + "targets": [ + "alias(movingMax(minSeries(focus.elasticsearch.focus351.*.cluster_health.status ), '10min' ), 'cluster_health' )" + ], + "warn_value": 1, + "error_value": 0, + "tags": ["devops"], + "ttl_state": "NODATA", + "ttl": 600, + "sched": { + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": [ + "focus.elasticsearch.focus351.*.cluster_health.status" + ], + "trigger_type": "falling", + "throttling": 0, + "last_check": { + "metrics": { + "cluster_health": { + "event_timestamp": 1504380008, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504452999, + "maintenance": 1504078439 + } + }, + "score": 2000, + "state": "NODATA", + "timestamp": 1504511501, + "event_timestamp": 1504511501, + "msg": "Trigger has no metrics" + }, + "is_remote": true + }, + { + "id": "e872a927-e6d2-4b2e-b1fb-63d2345357f2", + "name": "KE_SYSTEM_CPU", + "targets": ["KE.system.busc.*.cpu.usage"], + "warn_value": 80, + "error_value": 90, + "tags": ["test"], + "ttl_state": "NODATA", + "ttl": 600, + "sched": { + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": ["KE.system.busc.*.cpu.usage"], + "trigger_type": "rising", + "throttling": 0, + "last_check": { + "metrics": { + "KE.system.busc.vm-busc1.cpu.usage": { + "event_timestamp": 1504430588, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510901 + }, + "KE.system.busc.vm-busc2.cpu.usage": { + "event_timestamp": 1504430588, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510901 + } + }, + "score": 2000, + "state": "OK", + "timestamp": 1504511501 + }, + "is_remote": false } - ], - "startOffset": 0, - "tzOffset": -300 - }, - "tags": [ - "errors", - "warnings" - ], - "throttling": true, - "contacts": [ - "728b26d9-1947-4856-a285-145923fd9bcb" + ] + }, + "trigger": { + "id": "f96c5608-bd00-4ea2-abd5-be677cdf7e03", + "name": "12321", + "targets": [ + "aliasByNode(Egais.Api.Front.Controllers.Time.*.*.*.*.p95,5, 7, 8)" ], - "enabled": true, - "user": "testuser", - "id": "ad1c71aa-9f8b-4d29-b8ac-cd76c6f7b4c9" - }, - { + "warn_value": 11111111111, + "error_value": 22222222222, + "tags": ["devops"], + "ttl_state": "NODATA", + "ttl": 600, "sched": { - "endOffset": 1439, - "days": [ + "days": [ + { + "enabled": true, + "name": "Mon" + }, + { + "enabled": true, + "name": "Tue" + }, + { + "enabled": true, + "name": "Wed" + }, + { + "enabled": true, + "name": "Thu" + }, + { + "enabled": true, + "name": "Fri" + }, + { + "enabled": true, + "name": "Sat" + }, + { + "enabled": true, + "name": "Sun" + } + ], + "tzOffset": -300, + "startOffset": 0, + "endOffset": 1439 + }, + "patterns": ["Egais.Api.Front.Controllers.Time.*.*.*.*.p95"], + "trigger_type": "rising", + "throttling": 0, + "last_check": { + "metrics": { + "EG-APP-01.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Billing.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cards.CardsCount": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cards.List": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashboxes.List": { + "event_timestamp": 1504457162, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.GoodsProcessings.InProcess": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.News.Check": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504455422, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ReleaseVersion.Run": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesJournalCalendar.GetToday": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504570, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504630, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreContractors.FindAll": { + "event_timestamp": 1504457890, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.StoreWayBills.Find": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-01.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.About.Run": { + "event_timestamp": 1504510661, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.DownloadFile": { + "event_timestamp": 1504448468, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.GetCount": { + "event_timestamp": 1504503670, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsIncomingDocuments.Search": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.DownloadFile": { + "event_timestamp": 1504440488, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.GetCount": { + "event_timestamp": 1504450568, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.AdminToolsOutgoingDocuments.Search": { + "event_timestamp": 1504441268, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Billing.Check": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.BusinessStatistics.WritePrintCardsEvent": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.BusinessStatistics.WriteUtmVersionEvent": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.CardsCount": { + "event_timestamp": 1504457950, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cards.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashboxes.List": { + "event_timestamp": 1504457770, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Cashiers.GetTotalCashiers": { + "event_timestamp": 1504457470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Contractors.List": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DailyStats.Today": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.GetSalesPointsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DepartmentUtmLocations.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.DocumentsFromDepartmentUtmPosting.Document": { + "event_timestamp": 1504456442, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.MarkAsSeen": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FeatureAppearance.ReadAllItems": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.FormA.GetUnfinishedRequestsRegIds": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.GoodsProcessings.InProcess": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Inventory.WelcomeIsSeen": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.News.Check": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PartySettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PriceTag.NewPriceTagsCount": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.Barcodes": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.PrintBarcode.ProcessCard": { + "event_timestamp": 1504429508, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProductGroups.Load": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ProdutcsSearch.Search": { + "event_timestamp": 1504444088, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.QueryAp.GenerateQueryAp": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.QueryAp.UtmReplyForQueryAp": { + "event_timestamp": 1504456142, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ReleaseVersion.Run": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ResourceGroup.GetResourceGroup": { + "event_timestamp": 1504501450, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Rests.List": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.CanRemoveAutoRows": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournal.ReadDay": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalActs.GetButtonInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesJournalCalendar.GetInfo": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.MarkSeenBeerActsInJup": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.SalesPointSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopBalanceAdjustment.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.ShopRests.IsRestsNeedUpdate": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StockDevastation.GetCurrentProcessingId": { + "event_timestamp": 1504504690, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.FindAll": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreContractors.MyDepartments": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.StoreWayBills.Find": { + "event_timestamp": 1504458010, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.UserSettings.Read": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.Utils.GetMoscowDateNow": { + "event_timestamp": 1504502470, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-02.VersionInfo.GetVersionInfoRequest": { + "event_timestamp": 1504456202, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.About.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + }, + "EG-APP-03.Help.Run": { + "event_timestamp": 1504510781, + "state": "NODATA", + "suppressed": false, + "timestamp": 1504510781 + } + }, + "score": 104000, + "state": "OK", + "timestamp": 1504511501 + }, + "is_remote": false + }, + "state": { + "metrics": { + "vm-elk-f1": { + "event_timestamp": 1503992518, + "state": "OK", + "suppressed": false, + "timestamp": 1504516241, + "value": 82.47 + }, + "vm-elk-l1": { + "event_timestamp": 1503992686, + "state": "OK", + "suppressed": false, + "timestamp": 1504516241, + "value": 96.39 + }, + "vm-elk-r1": { + "event_timestamp": 1503992698, + "state": "OK", + "suppressed": false, + "timestamp": 1504516241, + "value": 93.18 + }, + "vm-elk-r2": { + "event_timestamp": 1503992299, + "state": "OK", + "suppressed": false, + "timestamp": 1504516241, + "value": 89.53 + }, + "vm-elk-s1": { + "event_timestamp": 1504407083, + "state": "WARN", + "suppressed": false, + "timestamp": 1504516241, + "value": 10.29 + }, + "vm-elk-s2": { + "event_timestamp": 1504390505, + "state": "WARN", + "suppressed": false, + "timestamp": 1504516241, + "value": 12.33 + }, + "vm-elk-s3": { + "event_timestamp": 1503992825, + "state": "OK", + "suppressed": false, + "timestamp": 1504516241, + "value": 24.36 + } + }, + "score": 2, + "state": "OK", + "timestamp": 1504516361, + "trigger_id": "69b1-91c1-423f-ab3b-d1a8" + }, + "event": { + "page": 0, + "size": 100, + "total": 100, + "list": [ { - "enabled": true, - "name": "Mon" + "timestamp": 1504407083, + "metric": "vm-elk-s1", + "value": 18.95, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1504406903, + "metric": "vm-elk-s1", + "value": 20.89, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1504390505, + "metric": "vm-elk-s2", + "value": 19.83, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1504383443, + "metric": "vm-elk-s1", + "value": 19.94, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1504383383, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1504383203, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sun" - } - ], - "startOffset": 0, - "tzOffset": -300 - }, - "tags": [ - "critical", - "devops", - "frontend", - "backend", - "test" - ], - "throttling": false, - "contacts": [ - "06a684b5-53d4-4cae-8bbf-14acee20198d" - ], - "enabled": true, - "user": "testuser", - "id": "b2a37dcf-a347-4128-b53b-c13c5c5f0c08" - }, - { - "sched": { - "endOffset": 1439, - "days": [ + "timestamp": 1504378625, + "metric": "vm-elk-s2", + "value": 21.34, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1504378583, + "metric": "vm-elk-s1", + "value": 25.25, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1504371203, + "metric": "vm-elk-s1", + "value": 19.91, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1504366463, + "metric": "vm-elk-s1", + "value": 22.04, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1504326365, + "metric": "vm-elk-s2", + "value": 19.9, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1504326305, + "metric": "vm-elk-s2", + "value": 20.02, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1504325945, + "metric": "vm-elk-s2", + "value": 19.91, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sun" - } - ], - "startOffset": 0, - "tzOffset": -300 - }, - "tags": [ - "devops", - "frontend" - ], - "throttling": false, - "contacts": [ - "06a684b5-53d4-4cae-8bbf-14acee20198d" - ], - "enabled": false, - "user": "testuser", - "id": "9f1ce01c-2de5-4324-b1fb-bc38140e585f" - } - ] - }, - "triggers": { - "page": 0, - "size": 5, - "total": 5, - "list": [ - { - "id": "f96c5608-bd00-4ea2-abd5-be677cdf7e03", - "name": "12321", - "targets": [ - "aliasByNode(Egais.Api.Front.Controllers.Time.*.*.*.*.p95,5, 7, 8)" - ], - "warn_value": 11111111111, - "error_value": 22222222222, - "tags": [ - "devops" - ], - "ttl_state": "NODATA", - "ttl": 600, - "sched": { - "days": [ + "timestamp": 1504325885, + "metric": "vm-elk-s2", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1504325825, + "metric": "vm-elk-s2", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1504325765, + "metric": "vm-elk-s2", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1504325705, + "metric": "vm-elk-s2", + "value": 19.91, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1504325646, + "metric": "vm-elk-s2", + "value": 20.02, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1504325527, + "metric": "vm-elk-s2", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1504325405, + "metric": "vm-elk-s2", + "value": 20.1, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sun" - } - ], - "tzOffset": -300, - "startOffset": 0, - "endOffset": 1439 - }, - "patterns": [ - "Egais.Api.Front.Controllers.Time.*.*.*.*.p95" - ], - "trigger_type": "rising", - "throttling": 0, - "last_check": { - "metrics": { - "EG-APP-01.About.Run": { - "event_timestamp": 1504510661, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.DownloadFile": { - "event_timestamp": 1504448468, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.GetCount": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.Search": { - "event_timestamp": 1504503670, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.DownloadFile": { - "event_timestamp": 1504440488, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.GetCount": { - "event_timestamp": 1504441268, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.Search": { - "event_timestamp": 1504450568, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Billing.Check": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.BusinessStatistics.WriteUtmVersionEvent": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cards.CardsCount": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cards.List": { - "event_timestamp": 1504456142, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cashboxes.List": { - "event_timestamp": 1504457162, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cashiers.GetTotalCashiers": { - "event_timestamp": 1504457770, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Contractors.List": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DailyStats.Today": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentSettings.GetSalesPointsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentUtmLocations.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DocumentsFromDepartmentUtmPosting.Document": { - "event_timestamp": 1504456442, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.FeatureAppearance.ReadAllItems": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.FormA.GetUnfinishedRequestsRegIds": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.GoodsProcessings.InProcess": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Inventory.WelcomeIsSeen": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.News.Check": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PartySettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PriceTag.NewPriceTagsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PrintBarcode.Barcodes": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ProductGroups.Load": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.QueryAp.GenerateQueryAp": { - "event_timestamp": 1504455422, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.QueryAp.UtmReplyForQueryAp": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ReleaseVersion.Run": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ResourceGroup.GetResourceGroup": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Rests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Rests.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournal.CanRemoveAutoRows": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournalActs.GetButtonInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournalCalendar.GetToday": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesPointSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ShopBalanceAdjustment.GetCurrentProcessingId": { - "event_timestamp": 1504504570, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ShopRests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StockDevastation.GetCurrentProcessingId": { - "event_timestamp": 1504504630, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StoreContractors.FindAll": { - "event_timestamp": 1504457890, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StoreContractors.MyDepartments": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StoreWayBills.Find": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.UserSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Utils.GetMoscowDateNow": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.VersionInfo.GetVersionInfoRequest": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.About.Run": { - "event_timestamp": 1504510661, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.DownloadFile": { - "event_timestamp": 1504448468, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.GetCount": { - "event_timestamp": 1504503670, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.Search": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.DownloadFile": { - "event_timestamp": 1504440488, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.GetCount": { - "event_timestamp": 1504450568, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.Search": { - "event_timestamp": 1504441268, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Billing.Check": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.BusinessStatistics.WritePrintCardsEvent": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.BusinessStatistics.WriteUtmVersionEvent": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cards.CardsCount": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cards.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cashboxes.List": { - "event_timestamp": 1504457770, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cashiers.GetTotalCashiers": { - "event_timestamp": 1504457470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Contractors.List": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DailyStats.Today": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DepartmentSettings.GetSalesPointsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DepartmentSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DepartmentUtmLocations.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DocumentsFromDepartmentUtmPosting.Document": { - "event_timestamp": 1504456442, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FeatureAppearance.MarkAsSeen": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FeatureAppearance.ReadAllItems": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FormA.GetUnfinishedRequestsRegIds": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.GoodsProcessings.InProcess": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Inventory.WelcomeIsSeen": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.News.Check": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PartySettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PriceTag.NewPriceTagsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PrintBarcode.Barcodes": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PrintBarcode.ProcessCard": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ProductGroups.Load": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ProdutcsSearch.Search": { - "event_timestamp": 1504444088, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.QueryAp.GenerateQueryAp": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.QueryAp.UtmReplyForQueryAp": { - "event_timestamp": 1504456142, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ReleaseVersion.Run": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ResourceGroup.GetResourceGroup": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Rests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Rests.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournal.CanRemoveAutoRows": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournal.ReadDay": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournalActs.GetButtonInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournalCalendar.GetInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesPointSettings.MarkSeenBeerActsInJup": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesPointSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ShopBalanceAdjustment.GetCurrentProcessingId": { - "event_timestamp": 1504504690, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ShopRests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StockDevastation.GetCurrentProcessingId": { - "event_timestamp": 1504504690, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreContractors.FindAll": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreContractors.MyDepartments": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreWayBills.Find": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.UserSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Utils.GetMoscowDateNow": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.VersionInfo.GetVersionInfoRequest": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-03.About.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-03.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - } - }, - "score": 104000, - "state": "OK", - "timestamp": 1504511501 - }, - "is_remote": false - }, - { - "id": "b562ca35-5f48-40f2-91de-4078a237c227", - "name": "Front", - "targets": [ - "aliasByNode(Egais.Api.Front.Controllers.Time.*.*.*.*.count, 5, 7, 8)" - ], - "warn_value": 10000, - "error_value": 20000, - "tags": [ - "frontend" - ], - "ttl_state": "NODATA", - "ttl": 600, - "sched": { - "days": [ + "timestamp": 1504325345, + "metric": "vm-elk-s2", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1504324686, + "metric": "vm-elk-s2", + "value": 20.21, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1504324447, + "metric": "vm-elk-s2", + "value": 19.98, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1503992843, + "metric": "vm-elk-s1", + "value": 17.15, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1503992825, + "metric": "vm-elk-s3", + "value": 44.42, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1503992698, + "metric": "vm-elk-r1", + "value": 93.22, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1503992686, + "metric": "vm-elk-l1", + "value": 96.54, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Sun" - } - ], - "tzOffset": -300, - "startOffset": 0, - "endOffset": 1439 - }, - "patterns": [ - "Egais.Api.Front.Controllers.Time.*.*.*.*.count" - ], - "trigger_type": "rising", - "throttling": 0, - "last_check": { - "metrics": { - "EG-APP-01.About.Run": { - "event_timestamp": 1504510661, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.DownloadFile": { - "event_timestamp": 1504448468, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.GetCount": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsIncomingDocuments.Search": { - "event_timestamp": 1504503670, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.DownloadFile": { - "event_timestamp": 1504440488, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.GetCount": { - "event_timestamp": 1504441268, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.AdminToolsOutgoingDocuments.Search": { - "event_timestamp": 1504450568, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Billing.Check": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.BusinessStatistics.WriteUtmVersionEvent": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cards.CardsCount": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504101679 - }, - "EG-APP-01.Cards.List": { - "event_timestamp": 1504456142, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cashboxes.List": { - "event_timestamp": 1504457162, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Cashiers.GetTotalCashiers": { - "event_timestamp": 1504457770, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Contractors.List": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DailyStats.Today": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentSettings.GetSalesPointsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.DepartmentUtmLocations.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504104380 - }, - "EG-APP-01.DocumentsFromDepartmentUtmPosting.Document": { - "event_timestamp": 1504456442, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.FeatureAppearance.ReadAllItems": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.FormA.GetUnfinishedRequestsRegIds": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504111583 - }, - "EG-APP-01.GoodsProcessings.InProcess": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Inventory.WelcomeIsSeen": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.News.Check": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PartySettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PriceTag.NewPriceTagsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.PrintBarcode.Barcodes": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ProductGroups.Load": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504122385 - }, - "EG-APP-01.QueryAp.GenerateQueryAp": { - "event_timestamp": 1504455422, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.QueryAp.UtmReplyForQueryAp": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ReleaseVersion.Run": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ResourceGroup.GetResourceGroup": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504187187 - }, - "EG-APP-01.Rests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.Rests.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournal.CanRemoveAutoRows": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournalActs.GetButtonInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesJournalCalendar.GetToday": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.SalesPointSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ShopBalanceAdjustment.GetCurrentProcessingId": { - "event_timestamp": 1504504570, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.ShopRests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StockDevastation.GetCurrentProcessingId": { - "event_timestamp": 1504504630, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.StoreContractors.FindAll": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": true, - "timestamp": 1504510781, - "maintenance": 1504705590 - }, - "EG-APP-01.StoreContractors.MyDepartments": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504101692 - }, - "EG-APP-01.StoreWayBills.Find": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.UserSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504104394 - }, - "EG-APP-01.Utils.GetMoscowDateNow": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-01.VersionInfo.GetVersionInfoRequest": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.About.Run": { - "event_timestamp": 1504510661, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.DownloadFile": { - "event_timestamp": 1504448468, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.GetCount": { - "event_timestamp": 1504503670, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsIncomingDocuments.Search": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.DownloadFile": { - "event_timestamp": 1504440488, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.GetCount": { - "event_timestamp": 1504450568, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.AdminToolsOutgoingDocuments.Search": { - "event_timestamp": 1504441268, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Billing.Check": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504111597 - }, - "EG-APP-02.BusinessStatistics.WritePrintCardsEvent": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.BusinessStatistics.WriteUtmVersionEvent": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cards.CardsCount": { - "event_timestamp": 1504457950, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cards.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cashboxes.List": { - "event_timestamp": 1504457770, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Cashiers.GetTotalCashiers": { - "event_timestamp": 1504457470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504111599 - }, - "EG-APP-02.Contractors.List": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DailyStats.Today": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DepartmentSettings.GetSalesPointsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.DepartmentSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504122402 - }, - "EG-APP-02.DepartmentUtmLocations.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781, - "maintenance": 1504187203 - }, - "EG-APP-02.DocumentsFromDepartmentUtmPosting.Document": { - "event_timestamp": 1504456442, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FeatureAppearance.MarkAsSeen": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FeatureAppearance.ReadAllItems": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.FormA.GetUnfinishedRequestsRegIds": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.GoodsProcessings.InProcess": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Inventory.WelcomeIsSeen": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.News.Check": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PartySettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PriceTag.NewPriceTagsCount": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PrintBarcode.Barcodes": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.PrintBarcode.ProcessCard": { - "event_timestamp": 1504429508, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ProductGroups.Load": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ProdutcsSearch.Search": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": true, - "timestamp": 1504510781, - "maintenance": 1504705573 - }, - "EG-APP-02.QueryAp.GenerateQueryAp": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.QueryAp.UtmReplyForQueryAp": { - "event_timestamp": 1504456142, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ReleaseVersion.Run": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ResourceGroup.GetResourceGroup": { - "event_timestamp": 1504501450, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Rests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Rests.List": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournal.CanRemoveAutoRows": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournal.ReadDay": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournalActs.GetButtonInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesJournalCalendar.GetInfo": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesPointSettings.MarkSeenBeerActsInJup": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.SalesPointSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ShopBalanceAdjustment.GetCurrentProcessingId": { - "event_timestamp": 1504504690, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.ShopRests.IsRestsNeedUpdate": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StockDevastation.GetCurrentProcessingId": { - "event_timestamp": 1504504690, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreContractors.FindAll": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreContractors.MyDepartments": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.StoreWayBills.Find": { - "event_timestamp": 1504458010, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.UserSettings.Read": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.Utils.GetMoscowDateNow": { - "event_timestamp": 1504502470, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-02.VersionInfo.GetVersionInfoRequest": { - "event_timestamp": 1504456202, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-03.About.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - }, - "EG-APP-03.Help.Run": { - "event_timestamp": 1504510781, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510781 - } - }, - "score": 104000, - "state": "OK", - "timestamp": 1504511501 - }, - "is_remote": true - }, - { - "id": "351de571-015f-40ff-b16e-8ca57585b4e8", - "name": "Devops processes uptime DiTrace", - "targets": [ - "aliasByNode(DevOps.system.*ditrace*.process.*.uptime, 2, 4)" - ], - "warn_value": 0.001, - "error_value": 0, - "tags": [ - "devops", - "nodata" - ], - "ttl_state": "NODATA", - "ttl": 600, - "sched": { - "days": [ + "timestamp": 1503992518, + "metric": "vm-elk-f1", + "value": 82.5, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1503992423, + "metric": "vm-elk-s2", + "value": 40.44, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1503992299, + "metric": "vm-elk-r2", + "value": 89.54, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1503992285, + "metric": "vm-elk-s1", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1503992278, + "metric": "vm-elk-s1", + "value": 17.3, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "NODATA" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1503992143, + "metric": "vm-elk-s1", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1503992143, + "metric": "vm-elk-s3", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sun" - } - ], - "tzOffset": -300, - "startOffset": 0, - "endOffset": 1439 - }, - "patterns": [ - "DevOps.system.*ditrace*.process.*.uptime" - ], - "trigger_type": "falling", - "throttling": 0, - "last_check": { - "metrics": { - "ditrace-lt.ditrace": { - "event_timestamp": 1503992566, - "state": "OK", - "suppressed": true, - "timestamp": 1504511381, - "value": 5359481, - "maintenance": 1504002302 - }, - "ditrace-lt.elasticsearch": { - "event_timestamp": 1503992386, - "state": "OK", - "suppressed": true, - "timestamp": 1504511381, - "value": 11824960, - "maintenance": 1504520708 - }, - "ditrace-lt.nginx": { - "event_timestamp": 1503992566, - "state": "OK", - "suppressed": true, - "timestamp": 1504511381, - "value": 35981206, - "maintenance": 1504521622 - }, - "vm-ditrace1.ditrace": { - "event_timestamp": 1503992299, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 602862 - }, - "vm-ditrace1.elasticsearch": { - "event_timestamp": 1503992400, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 5439035 - }, - "vm-ditrace1.nginx": { - "event_timestamp": 1503992299, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 27195168 - }, - "vm-ditrace2.ditrace": { - "event_timestamp": 1503992700, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 602859 - }, - "vm-ditrace2.elasticsearch": { - "event_timestamp": 1503992299, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 5439074 - }, - "vm-ditrace2.nginx": { - "event_timestamp": 1503484033, - "state": "NODATA", - "suppressed": false, - "timestamp": 1503496225 - }, - "vm-ditrace3.ditrace": { - "event_timestamp": 1503486527, - "state": "NODATA", - "suppressed": false, - "timestamp": 1503496225, - "maintenance": 1504100565 - }, - "vm-ditrace3.elasticsearch": { - "event_timestamp": 1503486527, - "state": "NODATA", - "suppressed": false, - "timestamp": 1503496225, - "maintenance": 1504118563 - }, - "vm-ditrace3.nginx": { - "event_timestamp": 1503484033, - "state": "NODATA", - "suppressed": false, - "timestamp": 1503496225, - "maintenance": 1504701757 - }, - "vm-ditrace4.ditrace": { - "event_timestamp": 1503992400, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 602189 - }, - "vm-ditrace4.elasticsearch": { - "event_timestamp": 1503992299, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 5824196 - }, - "vm-ditrace5.ditrace": { - "event_timestamp": 1503992845, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 509899 - }, - "vm-ditrace5.elasticsearch": { - "event_timestamp": 1503992700, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 1858776 - }, - "vm-ditrace6.ditrace": { - "event_timestamp": 1503992386, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 1213346 - }, - "vm-ditrace6.elasticsearch": { - "event_timestamp": 1503992359, - "state": "OK", - "suppressed": false, - "timestamp": 1504511381, - "value": 5796604 - } - }, - "score": 4000, - "state": "OK", - "timestamp": 1504511501 - }, - "is_remote": false - }, - { - "id": "f08977e6-bfcd-4ca4-8e4a-5b3ffc56284b", - "name": "focus351 Elasticsearch cluster status", - "desc": "", - "targets": [ - "alias(movingMax(minSeries(focus.elasticsearch.focus351.*.cluster_health.status ), '10min' ), 'cluster_health' )" - ], - "warn_value": 1, - "error_value": 0, - "tags": [ - "devops" - ], - "ttl_state": "NODATA", - "ttl": 600, - "sched": { - "days": [ + "timestamp": 1503992143, + "metric": "vm-elk-s2", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1503992143, + "metric": "vm-elk-r2", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1503992143, + "metric": "vm-elk-r1", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1503992143, + "metric": "vm-elk-l1", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1503992143, + "metric": "vm-elk-f1", + "state": "NODATA", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1503879743, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1503878663, + "metric": "vm-elk-s1", + "value": 20.1, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sun" - } - ], - "tzOffset": -300, - "startOffset": 0, - "endOffset": 1439 - }, - "patterns": [ - "focus.elasticsearch.focus351.*.cluster_health.status" - ], - "trigger_type": "falling", - "throttling": 0, - "last_check": { - "metrics": { - "cluster_health": { - "event_timestamp": 1504380008, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504452999, - "maintenance": 1504078439 - } - }, - "score": 2000, - "state": "NODATA", - "timestamp": 1504511501, - "event_timestamp": 1504511501, - "msg": "Trigger has no metrics" - }, - "is_remote": true - }, - { - "id": "e872a927-e6d2-4b2e-b1fb-63d2345357f2", - "name": "KE_SYSTEM_CPU", - "targets": [ - "KE.system.busc.*.cpu.usage" - ], - "warn_value": 80, - "error_value": 90, - "tags": [ - "test" - ], - "ttl_state": "NODATA", - "ttl": 600, - "sched": { - "days": [ + "timestamp": 1503831563, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503831203, + "metric": "vm-elk-s1", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503830063, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503829943, + "metric": "vm-elk-s1", + "value": 20.02, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503829883, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503827243, + "metric": "vm-elk-s1", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503824483, + "metric": "vm-elk-s1", + "value": 19.98, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503824423, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503824363, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503823943, + "metric": "vm-elk-s1", + "value": 20.08, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503823583, + "metric": "vm-elk-s1", + "value": 19.96, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503822143, + "metric": "vm-elk-s1", + "value": 20.19, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503821723, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503788843, + "metric": "vm-elk-s1", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503788723, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503788543, + "metric": "vm-elk-s1", + "value": 20.04, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503788063, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503442763, + "metric": "vm-elk-s1", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503442583, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503442223, + "metric": "vm-elk-s1", + "value": 20.03, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503442163, + "metric": "vm-elk-s1", + "value": 19.97, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503440963, + "metric": "vm-elk-s1", + "value": 20.09, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503440723, + "metric": "vm-elk-s1", + "value": 19.97, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503440663, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503440603, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503440423, + "metric": "vm-elk-s1", + "value": 20.03, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503440303, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503270622, + "metric": "vm-elk-s1", + "value": 21.82, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503127822, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503127462, + "metric": "vm-elk-s1", + "value": 20.03, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503127282, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503127223, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503127162, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503125662, + "metric": "vm-elk-s1", + "value": 20.07, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503120022, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503119242, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503119183, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503115642, + "metric": "vm-elk-s1", + "value": 20.1, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503115403, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503114022, + "metric": "vm-elk-s1", + "value": 20.1, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503113722, + "metric": "vm-elk-s1", + "value": 19.9, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503110482, + "metric": "vm-elk-s1", + "value": 20.15, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503110422, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503110362, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1503109823, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1503098062, + "metric": "vm-elk-s1", + "value": 20.12, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1502502862, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1502502081, + "metric": "vm-elk-s1", + "value": 20.15, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1502501961, + "metric": "vm-elk-s1", + "value": 19.99, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, + { + "timestamp": 1502493142, + "metric": "vm-elk-s1", + "value": 20.16, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1502446043, + "metric": "vm-elk-s1", + "value": 19.96, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" + }, { - "enabled": true, - "name": "Mon" + "timestamp": 1502445743, + "metric": "vm-elk-s1", + "value": 20.02, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Tue" + "timestamp": 1502445502, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Wed" + "timestamp": 1502443942, + "metric": "vm-elk-s1", + "value": 20.06, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Thu" + "timestamp": 1502443763, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Fri" + "timestamp": 1502443703, + "metric": "vm-elk-s1", + "value": 20.01, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" }, { - "enabled": true, - "name": "Sat" + "timestamp": 1502443583, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" }, { - "enabled": true, - "name": "Sun" + "timestamp": 1502439083, + "metric": "vm-elk-s1", + "value": 20.19, + "state": "OK", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "WARN" + }, + { + "timestamp": 1502439023, + "metric": "vm-elk-s1", + "value": 20, + "state": "WARN", + "trigger_id": "69b1-91c1-423f-ab3b-d1a8", + "old_state": "OK" } - ], - "tzOffset": -300, - "startOffset": 0, - "endOffset": 1439 - }, - "patterns": [ - "KE.system.busc.*.cpu.usage" - ], - "trigger_type": "rising", - "throttling": 0, - "last_check": { - "metrics": { - "KE.system.busc.vm-busc1.cpu.usage": { - "event_timestamp": 1504430588, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510901 - }, - "KE.system.busc.vm-busc2.cpu.usage": { - "event_timestamp": 1504430588, - "state": "NODATA", - "suppressed": false, - "timestamp": 1504510901 + ] + }, + "notification": { + "total": 15, + "list": [ + { + "event": { + "timestamp": 1527595797, + "metric": "revise-cons-03", + "value": 57.6236096055626, + "state": "OK", + "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", + "old_state": "NODATA" + }, + "trigger": { + "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "name": "Virtual mashines Disks free space", + "desc": "", + "targets": [ + "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" + ], + "warn_value": 1, + "error_value": 0.5, + "__notifier_trigger_tags": ["ADK", "Alko"] + }, + "contact": { + "type": "telegram", + "value": "alkonotifications", + "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", + "user": "ffominyh" + }, + "throttled": false, + "send_fail": 60, + "timestamp": 1527599494 + }, + { + "event": { + "timestamp": 1527595797, + "metric": "revise-cons-04", + "value": 60.0083985195168, + "state": "OK", + "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", + "old_state": "NODATA" + }, + "trigger": { + "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "name": "Virtual mashines Disks free space", + "desc": "", + "targets": [ + "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" + ], + "warn_value": 1, + "error_value": 0.5, + "__notifier_trigger_tags": ["ADK", "Alko"] + }, + "contact": { + "type": "telegram", + "value": "alkonotifications", + "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", + "user": "ffominyh" + }, + "throttled": false, + "send_fail": 60, + "timestamp": 1527599495 + }, + { + "event": { + "timestamp": 1527595797, + "metric": "revise-cons-01", + "value": 47.4350335452495, + "state": "OK", + "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", + "old_state": "NODATA" + }, + "trigger": { + "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "name": "Virtual mashines Disks free space", + "desc": "", + "targets": [ + "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" + ], + "warn_value": 1, + "error_value": 0.5, + "__notifier_trigger_tags": ["ADK", "Alko"] + }, + "contact": { + "type": "telegram", + "value": "alkonotifications", + "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", + "user": "ffominyh" + }, + "throttled": false, + "send_fail": 60, + "timestamp": 1527599501 + }, + { + "event": { + "timestamp": 1527595797, + "metric": "revise-cons-02", + "value": 51.4516743327572, + "state": "OK", + "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", + "old_state": "NODATA" + }, + "trigger": { + "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", + "name": "Virtual mashines Disks free space", + "desc": "", + "targets": [ + "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" + ], + "warn_value": 1, + "error_value": 0.5, + "__notifier_trigger_tags": ["ADK", "Alko"] + }, + "contact": { + "type": "telegram", + "value": "alkonotifications", + "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", + "user": "ffominyh" + }, + "throttled": false, + "send_fail": 60, + "timestamp": 1527599501 + }, + { + "event": { + "timestamp": 1527597210, + "metric": "movingMax(transformNull(KE.sessionsetter.onpageload.responsecode.500.current,0),\"15m\")", + "value": 2, + "state": "ERROR", + "trigger_id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", + "sub_id": "52b60adc-d278-45b2-8334-c39b275de91e", + "old_state": "WARN" + }, + "trigger": { + "id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", + "name": "Ke.Api.Setter.500", + "desc": "Service Errors\nESD https://esd.skbkontur.ru/#/ke-sessionsetter\nDashboard https://grafana.skbkontur.ru/dashboard/db/ke-api-sessionsetter", + "targets": [ + "movingMax(transformNull(KE.sessionsetter.*.responsecode.5*.current, 0), '15m')" + ], + "warn_value": 1, + "error_value": 2, + "__notifier_trigger_tags": [ + "ke.api", + "setter", + "ke_api_alerts" + ] + }, + "contact": { + "type": "slack", + "value": "#ke_api_alerts", + "id": "e67ec559-1e70-4873-93ac-882b12da79c5", + "user": "andection" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527599787 + }, + { + "event": { + "timestamp": 1527597631, + "metric": "movingMax(transformNull(KE.sessionsetter.login.responsecode.500.current,0),\"15m\")", + "value": 1, + "state": "WARN", + "trigger_id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", + "sub_id": "52b60adc-d278-45b2-8334-c39b275de91e", + "old_state": "OK" + }, + "trigger": { + "id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", + "name": "Ke.Api.Setter.500", + "desc": "Service Errors\nESD https://esd.skbkontur.ru/#/ke-sessionsetter\nDashboard https://grafana.skbkontur.ru/dashboard/db/ke-api-sessionsetter", + "targets": [ + "movingMax(transformNull(KE.sessionsetter.*.responsecode.5*.current, 0), '15m')" + ], + "warn_value": 1, + "error_value": 2, + "__notifier_trigger_tags": [ + "ke.api", + "setter", + "ke_api_alerts" + ] + }, + "contact": { + "type": "slack", + "value": "#ke_api_alerts", + "id": "e67ec559-1e70-4873-93ac-882b12da79c5", + "user": "andection" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527599787 + }, + { + "event": { + "timestamp": 1527597605, + "metric": "apikeys.waitingrequests.VM-KE-PORTAL2", + "state": "NODATA", + "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", + "old_state": "OK" + }, + "trigger": { + "id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "name": "Очередь запросов в облаке", + "desc": "", + "targets": [ + "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" + ], + "warn_value": 30, + "error_value": 100, + "__notifier_trigger_tags": ["portal-cloud"] + }, + "contact": { + "type": "slack", + "value": "#portal_cloud_alerts", + "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", + "user": "dmitriy.vorotnikov" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600032 + }, + { + "event": { + "timestamp": 1527597605, + "metric": "apikeys.waitingrequests.VM-KE-PORTAL3", + "state": "NODATA", + "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", + "old_state": "OK" + }, + "trigger": { + "id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "name": "Очередь запросов в облаке", + "desc": "", + "targets": [ + "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" + ], + "warn_value": 30, + "error_value": 100, + "__notifier_trigger_tags": ["portal-cloud"] + }, + "contact": { + "type": "slack", + "value": "#portal_cloud_alerts", + "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", + "user": "dmitriy.vorotnikov" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600032 + }, + { + "event": { + "timestamp": 1527597605, + "metric": "apikeys.waitingrequests.VM-KE-PORTAL4", + "state": "NODATA", + "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", + "old_state": "OK" + }, + "trigger": { + "id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "name": "Очередь запросов в облаке", + "desc": "", + "targets": [ + "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" + ], + "warn_value": 30, + "error_value": 100, + "__notifier_trigger_tags": ["portal-cloud"] + }, + "contact": { + "type": "slack", + "value": "#portal_cloud_alerts", + "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", + "user": "dmitriy.vorotnikov" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600032 + }, + { + "event": { + "timestamp": 1527597605, + "metric": "apikeys.waitingrequests.VM-KE-PORTAL5", + "state": "NODATA", + "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", + "old_state": "OK" + }, + "trigger": { + "id": "55c99671-46db-4182-92d7-de4fb00b98cf", + "name": "Очередь запросов в облаке", + "desc": "", + "targets": [ + "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" + ], + "warn_value": 30, + "error_value": 100, + "__notifier_trigger_tags": ["portal-cloud"] + }, + "contact": { + "type": "slack", + "value": "#portal_cloud_alerts", + "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", + "user": "dmitriy.vorotnikov" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600032 + }, + { + "event": { + "timestamp": 1527598616, + "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", + "value": 160, + "state": "ERROR", + "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", + "old_state": "OK" + }, + "trigger": { + "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "name": "transport.IRUD.errors", + "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", + "targets": ["KE.transport.exceptions_caught.type.Irud*"], + "warn_value": 50, + "error_value": 100, + "__notifier_trigger_tags": ["dc.utilities", "KE"] + }, + "contact": { + "type": "slack", + "value": "ke_dc_alarm", + "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", + "user": "nikita314" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600508 + }, + { + "event": { + "timestamp": 1527598647, + "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", + "state": "OK", + "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", + "old_state": "ERROR" + }, + "trigger": { + "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "name": "transport.IRUD.errors", + "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", + "targets": ["KE.transport.exceptions_caught.type.Irud*"], + "warn_value": 50, + "error_value": 100, + "__notifier_trigger_tags": ["dc.utilities", "KE"] + }, + "contact": { + "type": "slack", + "value": "ke_dc_alarm", + "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", + "user": "nikita314" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600508 + }, + { + "event": { + "timestamp": 1527598856, + "metric": "KE.transport.exceptions_caught.type.IrudProcessed_RegisterAll", + "value": 73, + "state": "WARN", + "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", + "old_state": "ERROR" + }, + "trigger": { + "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "name": "transport.IRUD.errors", + "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", + "targets": ["KE.transport.exceptions_caught.type.Irud*"], + "warn_value": 50, + "error_value": 100, + "__notifier_trigger_tags": ["dc.utilities", "KE"] + }, + "contact": { + "type": "slack", + "value": "ke_dc_alarm", + "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", + "user": "nikita314" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600508 + }, + { + "event": { + "timestamp": 1527598917, + "metric": "KE.transport.exceptions_caught.type.IrudProcessed_RegisterAll", + "value": 131, + "state": "ERROR", + "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", + "old_state": "WARN" + }, + "trigger": { + "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "name": "transport.IRUD.errors", + "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", + "targets": ["KE.transport.exceptions_caught.type.Irud*"], + "warn_value": 50, + "error_value": 100, + "__notifier_trigger_tags": ["dc.utilities", "KE"] + }, + "contact": { + "type": "slack", + "value": "ke_dc_alarm", + "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", + "user": "nikita314" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600508 + }, + { + "event": { + "timestamp": 1527599217, + "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", + "value": 160, + "state": "ERROR", + "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", + "old_state": "OK" + }, + "trigger": { + "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", + "name": "transport.IRUD.errors", + "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", + "targets": ["KE.transport.exceptions_caught.type.Irud*"], + "warn_value": 50, + "error_value": 100, + "__notifier_trigger_tags": ["dc.utilities", "KE"] + }, + "contact": { + "type": "slack", + "value": "ke_dc_alarm", + "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", + "user": "nikita314" + }, + "throttled": true, + "send_fail": 0, + "timestamp": 1527600508 } - }, - "score": 2000, - "state": "OK", - "timestamp": 1504511501 - }, - "is_remote": false - } - ] - }, - "trigger": {}, - "state": { - "metrics": { - "vm-elk-f1": { - "event_timestamp": 1503992518, - "state": "OK", - "suppressed": false, - "timestamp": 1504516241, - "value": 82.47 - }, - "vm-elk-l1": { - "event_timestamp": 1503992686, - "state": "OK", - "suppressed": false, - "timestamp": 1504516241, - "value": 96.39 - }, - "vm-elk-r1": { - "event_timestamp": 1503992698, - "state": "OK", - "suppressed": false, - "timestamp": 1504516241, - "value": 93.18 - }, - "vm-elk-r2": { - "event_timestamp": 1503992299, - "state": "OK", - "suppressed": false, - "timestamp": 1504516241, - "value": 89.53 - }, - "vm-elk-s1": { - "event_timestamp": 1504407083, - "state": "WARN", - "suppressed": false, - "timestamp": 1504516241, - "value": 10.29 - }, - "vm-elk-s2": { - "event_timestamp": 1504390505, - "state": "WARN", - "suppressed": false, - "timestamp": 1504516241, - "value": 12.33 - }, - "vm-elk-s3": { - "event_timestamp": 1503992825, - "state": "OK", - "suppressed": false, - "timestamp": 1504516241, - "value": 24.36 - } + ] }, - "score": 2, - "state": "OK", - "timestamp": 1504516361, - "trigger_id": "69b1-91c1-423f-ab3b-d1a8" - }, - "event": { - "page": 0, - "size": 100, - "total": 100, - "list": [ - { - "timestamp": 1504407083, - "metric": "vm-elk-s1", - "value": 18.95, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504406903, - "metric": "vm-elk-s1", - "value": 20.89, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504390505, - "metric": "vm-elk-s2", - "value": 19.83, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504383443, - "metric": "vm-elk-s1", - "value": 19.94, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504383383, - "metric": "vm-elk-s1", - "value": 20.01, + "health": { "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504383203, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504378625, - "metric": "vm-elk-s2", - "value": 21.34, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504378583, - "metric": "vm-elk-s1", - "value": 25.25, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504371203, - "metric": "vm-elk-s1", - "value": 19.91, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504366463, - "metric": "vm-elk-s1", - "value": 22.04, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504326365, - "metric": "vm-elk-s2", - "value": 19.9, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504326305, - "metric": "vm-elk-s2", - "value": 20.02, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504325945, - "metric": "vm-elk-s2", - "value": 19.91, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504325885, - "metric": "vm-elk-s2", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504325825, - "metric": "vm-elk-s2", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504325765, - "metric": "vm-elk-s2", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504325705, - "metric": "vm-elk-s2", - "value": 19.91, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504325646, - "metric": "vm-elk-s2", - "value": 20.02, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504325527, - "metric": "vm-elk-s2", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504325405, - "metric": "vm-elk-s2", - "value": 20.1, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504325345, - "metric": "vm-elk-s2", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1504324686, - "metric": "vm-elk-s2", - "value": 20.21, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1504324447, - "metric": "vm-elk-s2", - "value": 19.98, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992843, - "metric": "vm-elk-s1", - "value": 17.15, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992825, - "metric": "vm-elk-s3", - "value": 44.42, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992698, - "metric": "vm-elk-r1", - "value": 93.22, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992686, - "metric": "vm-elk-l1", - "value": 96.54, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992518, - "metric": "vm-elk-f1", - "value": 82.5, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992423, - "metric": "vm-elk-s2", - "value": 40.44, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992299, - "metric": "vm-elk-r2", - "value": 89.54, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992285, - "metric": "vm-elk-s1", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503992278, - "metric": "vm-elk-s1", - "value": 17.3, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "NODATA" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-s1", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-s3", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-s2", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-r2", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-r1", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-l1", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503992143, - "metric": "vm-elk-f1", - "state": "NODATA", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503879743, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503878663, - "metric": "vm-elk-s1", - "value": 20.1, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503831563, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503831203, - "metric": "vm-elk-s1", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503830063, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503829943, - "metric": "vm-elk-s1", - "value": 20.02, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503829883, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503827243, - "metric": "vm-elk-s1", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503824483, - "metric": "vm-elk-s1", - "value": 19.98, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503824423, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503824363, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503823943, - "metric": "vm-elk-s1", - "value": 20.08, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503823583, - "metric": "vm-elk-s1", - "value": 19.96, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503822143, - "metric": "vm-elk-s1", - "value": 20.19, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503821723, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503788843, - "metric": "vm-elk-s1", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503788723, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503788543, - "metric": "vm-elk-s1", - "value": 20.04, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503788063, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503442763, - "metric": "vm-elk-s1", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503442583, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503442223, - "metric": "vm-elk-s1", - "value": 20.03, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503442163, - "metric": "vm-elk-s1", - "value": 19.97, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503440963, - "metric": "vm-elk-s1", - "value": 20.09, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503440723, - "metric": "vm-elk-s1", - "value": 19.97, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503440663, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503440603, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503440423, - "metric": "vm-elk-s1", - "value": 20.03, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503440303, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503270622, - "metric": "vm-elk-s1", - "value": 21.82, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503127822, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503127462, - "metric": "vm-elk-s1", - "value": 20.03, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503127282, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503127223, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503127162, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503125662, - "metric": "vm-elk-s1", - "value": 20.07, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503120022, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503119242, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503119183, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503115642, - "metric": "vm-elk-s1", - "value": 20.1, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503115403, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503114022, - "metric": "vm-elk-s1", - "value": 20.1, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503113722, - "metric": "vm-elk-s1", - "value": 19.9, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503110482, - "metric": "vm-elk-s1", - "value": 20.15, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503110422, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503110362, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1503109823, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1503098062, - "metric": "vm-elk-s1", - "value": 20.12, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502502862, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502502081, - "metric": "vm-elk-s1", - "value": 20.15, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502501961, - "metric": "vm-elk-s1", - "value": 19.99, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502493142, - "metric": "vm-elk-s1", - "value": 20.16, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502446043, - "metric": "vm-elk-s1", - "value": 19.96, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502445743, - "metric": "vm-elk-s1", - "value": 20.02, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502445502, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502443942, - "metric": "vm-elk-s1", - "value": 20.06, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502443763, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502443703, - "metric": "vm-elk-s1", - "value": 20.01, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502443583, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - }, - { - "timestamp": 1502439083, - "metric": "vm-elk-s1", - "value": 20.19, - "state": "OK", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "WARN" - }, - { - "timestamp": 1502439023, - "metric": "vm-elk-s1", - "value": 20, - "state": "WARN", - "trigger_id": "69b1-91c1-423f-ab3b-d1a8", - "old_state": "OK" - } - ] - }, - "notification": { - "total": 15, - "list": [ - { - "event": { - "timestamp": 1527595797, - "metric": "revise-cons-03", - "value": 57.6236096055626, - "state": "OK", - "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", - "old_state": "NODATA" - }, - "trigger": { - "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "name": "Virtual mashines Disks free space", - "desc": "", - "targets": [ - "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" - ], - "warn_value": 1, - "error_value": 0.5, - "__notifier_trigger_tags": [ - "ADK", - "Alko" - ] - }, - "contact": { - "type": "telegram", - "value": "alkonotifications", - "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", - "user": "ffominyh" - }, - "throttled": false, - "send_fail": 60, - "timestamp": 1527599494 - }, - { - "event": { - "timestamp": 1527595797, - "metric": "revise-cons-04", - "value": 60.0083985195168, - "state": "OK", - "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", - "old_state": "NODATA" - }, - "trigger": { - "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "name": "Virtual mashines Disks free space", - "desc": "", - "targets": [ - "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" - ], - "warn_value": 1, - "error_value": 0.5, - "__notifier_trigger_tags": [ - "ADK", - "Alko" - ] - }, - "contact": { - "type": "telegram", - "value": "alkonotifications", - "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", - "user": "ffominyh" - }, - "throttled": false, - "send_fail": 60, - "timestamp": 1527599495 - }, - { - "event": { - "timestamp": 1527595797, - "metric": "revise-cons-01", - "value": 47.4350335452495, - "state": "OK", - "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", - "old_state": "NODATA" - }, - "trigger": { - "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "name": "Virtual mashines Disks free space", - "desc": "", - "targets": [ - "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" - ], - "warn_value": 1, - "error_value": 0.5, - "__notifier_trigger_tags": [ - "ADK", - "Alko" - ] - }, - "contact": { - "type": "telegram", - "value": "alkonotifications", - "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", - "user": "ffominyh" - }, - "throttled": false, - "send_fail": 60, - "timestamp": 1527599501 - }, - { - "event": { - "timestamp": 1527595797, - "metric": "revise-cons-02", - "value": 51.4516743327572, - "state": "OK", - "trigger_id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "sub_id": "5d28b1ae-784c-4394-acbc-9ff09e938725", - "old_state": "NODATA" - }, - "trigger": { - "id": "f8c83ce1-d14d-4763-b0eb-b4948fcc5d36", - "name": "Virtual mashines Disks free space", - "desc": "", - "targets": [ - "exclude(aliasByNode(Alko.system.*.logicaldisk.c.freespace, 2), '-edi|edi-|rosalco*|icat|expert2|-log|-common|total|eg-')" - ], - "warn_value": 1, - "error_value": 0.5, - "__notifier_trigger_tags": [ - "ADK", - "Alko" - ] - }, - "contact": { - "type": "telegram", - "value": "alkonotifications", - "id": "da699e28-4ab5-4510-9354-1cb85d4319e7", - "user": "ffominyh" - }, - "throttled": false, - "send_fail": 60, - "timestamp": 1527599501 - }, - { - "event": { - "timestamp": 1527597210, - "metric": "movingMax(transformNull(KE.sessionsetter.onpageload.responsecode.500.current,0),\"15m\")", - "value": 2, - "state": "ERROR", - "trigger_id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", - "sub_id": "52b60adc-d278-45b2-8334-c39b275de91e", - "old_state": "WARN" - }, - "trigger": { - "id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", - "name": "Ke.Api.Setter.500", - "desc": "Service Errors\nESD https://esd.skbkontur.ru/#/ke-sessionsetter\nDashboard https://grafana.skbkontur.ru/dashboard/db/ke-api-sessionsetter", - "targets": [ - "movingMax(transformNull(KE.sessionsetter.*.responsecode.5*.current, 0), '15m')" - ], - "warn_value": 1, - "error_value": 2, - "__notifier_trigger_tags": [ - "ke.api", - "setter", - "ke_api_alerts" - ] - }, - "contact": { - "type": "slack", - "value": "#ke_api_alerts", - "id": "e67ec559-1e70-4873-93ac-882b12da79c5", - "user": "andection" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527599787 - }, - { - "event": { - "timestamp": 1527597631, - "metric": "movingMax(transformNull(KE.sessionsetter.login.responsecode.500.current,0),\"15m\")", - "value": 1, - "state": "WARN", - "trigger_id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", - "sub_id": "52b60adc-d278-45b2-8334-c39b275de91e", - "old_state": "OK" - }, - "trigger": { - "id": "cc923998-03a2-49af-9ae7-3bc454e8eaf9", - "name": "Ke.Api.Setter.500", - "desc": "Service Errors\nESD https://esd.skbkontur.ru/#/ke-sessionsetter\nDashboard https://grafana.skbkontur.ru/dashboard/db/ke-api-sessionsetter", - "targets": [ - "movingMax(transformNull(KE.sessionsetter.*.responsecode.5*.current, 0), '15m')" - ], - "warn_value": 1, - "error_value": 2, - "__notifier_trigger_tags": [ - "ke.api", - "setter", - "ke_api_alerts" - ] - }, - "contact": { - "type": "slack", - "value": "#ke_api_alerts", - "id": "e67ec559-1e70-4873-93ac-882b12da79c5", - "user": "andection" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527599787 - }, - { - "event": { - "timestamp": 1527597605, - "metric": "apikeys.waitingrequests.VM-KE-PORTAL2", - "state": "NODATA", - "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", - "old_state": "OK" - }, - "trigger": { - "id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "name": "Очередь запросов в облаке", - "desc": "", - "targets": [ - "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" - ], - "warn_value": 30, - "error_value": 100, - "__notifier_trigger_tags": [ - "portal-cloud" - ] - }, - "contact": { - "type": "slack", - "value": "#portal_cloud_alerts", - "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", - "user": "dmitriy.vorotnikov" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600032 - }, - { - "event": { - "timestamp": 1527597605, - "metric": "apikeys.waitingrequests.VM-KE-PORTAL3", - "state": "NODATA", - "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", - "old_state": "OK" - }, - "trigger": { - "id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "name": "Очередь запросов в облаке", - "desc": "", - "targets": [ - "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" - ], - "warn_value": 30, - "error_value": 100, - "__notifier_trigger_tags": [ - "portal-cloud" - ] - }, - "contact": { - "type": "slack", - "value": "#portal_cloud_alerts", - "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", - "user": "dmitriy.vorotnikov" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600032 - }, - { - "event": { - "timestamp": 1527597605, - "metric": "apikeys.waitingrequests.VM-KE-PORTAL4", - "state": "NODATA", - "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", - "old_state": "OK" - }, - "trigger": { - "id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "name": "Очередь запросов в облаке", - "desc": "", - "targets": [ - "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" - ], - "warn_value": 30, - "error_value": 100, - "__notifier_trigger_tags": [ - "portal-cloud" - ] - }, - "contact": { - "type": "slack", - "value": "#portal_cloud_alerts", - "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", - "user": "dmitriy.vorotnikov" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600032 - }, - { - "event": { - "timestamp": 1527597605, - "metric": "apikeys.waitingrequests.VM-KE-PORTAL5", - "state": "NODATA", - "trigger_id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "sub_id": "80a3b78a-fd1d-47f1-821c-75edb057f6a0", - "old_state": "OK" - }, - "trigger": { - "id": "55c99671-46db-4182-92d7-de4fb00b98cf", - "name": "Очередь запросов в облаке", - "desc": "", - "targets": [ - "aliasByNode(Portal-cloud.*.core.waitingrequests.host.{VM-KE-PORTAL*,VM-KE-API*}, 1, 3, 5)" - ], - "warn_value": 30, - "error_value": 100, - "__notifier_trigger_tags": [ - "portal-cloud" - ] - }, - "contact": { - "type": "slack", - "value": "#portal_cloud_alerts", - "id": "1bf40729-1487-4a8d-95ad-3d17462d94e0", - "user": "dmitriy.vorotnikov" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600032 - }, - { - "event": { - "timestamp": 1527598616, - "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", - "value": 160, - "state": "ERROR", - "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", - "old_state": "OK" - }, - "trigger": { - "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "name": "transport.IRUD.errors", - "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", - "targets": [ - "KE.transport.exceptions_caught.type.Irud*" - ], - "warn_value": 50, - "error_value": 100, - "__notifier_trigger_tags": [ - "dc.utilities", - "KE" - ] - }, - "contact": { - "type": "slack", - "value": "ke_dc_alarm", - "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", - "user": "nikita314" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600508 - }, - { - "event": { - "timestamp": 1527598647, - "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", - "state": "OK", - "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", - "old_state": "ERROR" - }, - "trigger": { - "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "name": "transport.IRUD.errors", - "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", - "targets": [ - "KE.transport.exceptions_caught.type.Irud*" - ], - "warn_value": 50, - "error_value": 100, - "__notifier_trigger_tags": [ - "dc.utilities", - "KE" - ] - }, - "contact": { - "type": "slack", - "value": "ke_dc_alarm", - "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", - "user": "nikita314" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600508 - }, - { - "event": { - "timestamp": 1527598856, - "metric": "KE.transport.exceptions_caught.type.IrudProcessed_RegisterAll", - "value": 73, - "state": "WARN", - "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", - "old_state": "ERROR" - }, - "trigger": { - "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "name": "transport.IRUD.errors", - "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", - "targets": [ - "KE.transport.exceptions_caught.type.Irud*" - ], - "warn_value": 50, - "error_value": 100, - "__notifier_trigger_tags": [ - "dc.utilities", - "KE" - ] - }, - "contact": { - "type": "slack", - "value": "ke_dc_alarm", - "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", - "user": "nikita314" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600508 - }, - { - "event": { - "timestamp": 1527598917, - "metric": "KE.transport.exceptions_caught.type.IrudProcessed_RegisterAll", - "value": 131, - "state": "ERROR", - "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", - "old_state": "WARN" - }, - "trigger": { - "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "name": "transport.IRUD.errors", - "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", - "targets": [ - "KE.transport.exceptions_caught.type.Irud*" - ], - "warn_value": 50, - "error_value": 100, - "__notifier_trigger_tags": [ - "dc.utilities", - "KE" - ] - }, - "contact": { - "type": "slack", - "value": "ke_dc_alarm", - "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", - "user": "nikita314" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600508 - }, - { - "event": { - "timestamp": 1527599217, - "metric": "KE.transport.exceptions_caught.type.IrudProcessed_CheckAll", - "value": 160, - "state": "ERROR", - "trigger_id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "sub_id": "070abd46-21ca-4637-be37-b5576e226d3f", - "old_state": "OK" - }, - "trigger": { - "id": "b7855ffe-89bd-4719-9424-fdca6874b16d", - "name": "transport.IRUD.errors", - "desc": "График:\nhttps://grafana.skbkontur.ru/dashboard/db/dc-transportutilities?refresh=30s&panelId=9&fullscreen&orgId=1", - "targets": [ - "KE.transport.exceptions_caught.type.Irud*" - ], - "warn_value": 50, - "error_value": 100, - "__notifier_trigger_tags": [ - "dc.utilities", - "KE" - ] - }, - "contact": { - "type": "slack", - "value": "ke_dc_alarm", - "id": "7ff06c80-8fc8-4247-bbbb-768534ae0bbe", - "user": "nikita314" - }, - "throttled": true, - "send_fail": 0, - "timestamp": 1527600508 - } - ] - }, - "health": { - "state": "OK", - "message": null - } -} \ No newline at end of file + "message": null + } +} diff --git a/package.json b/package.json index b47840034..159ff0d52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moira-front", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "scripts": { "start": "cross-env NODE_ENV=development webpack-dev-server --hot --inline --history-api-fallback --compress --port 9000 --content-base /dist", diff --git a/src/Api/MoiraAPI.js b/src/Api/MoiraAPI.js index 3518749cb..ce861f060 100644 --- a/src/Api/MoiraAPI.js +++ b/src/Api/MoiraAPI.js @@ -11,7 +11,7 @@ import type { Contact, ContactList } from "../Domain/Contact"; import type { ContactCreateInfo } from "../Domain/ContactCreateInfo"; import type { Subscription } from "../Domain/Subscription"; import type { Schedule } from "../Domain/Schedule"; -import type { MoiraStatus } from "../Domain/MoiraStatus"; +import type { NotifierState } from "../Domain/MoiraServiceStates"; export type SubscriptionCreateInfo = {| sched: Schedule, @@ -42,7 +42,7 @@ export interface IMoiraApi { testContact(contactId: string): Promise; addSubscription(subscription: SubscriptionCreateInfo): Promise; updateSubscription(subscription: Subscription): Promise; - deleteSubscription(subscriptionId: string): Promise; + delSubscription(subscriptionId: string): Promise; testSubscription(subscriptionId: string): Promise; deleteContact(contactId: string): Promise; getPatternList(): Promise; @@ -60,12 +60,13 @@ export interface IMoiraApi { getTriggerEvents(id: string, page: number): Promise; delThrottling(triggerId: string): Promise; delMetric(triggerId: string, metric: string): Promise; + delNoDataMetric(triggerId: string): Promise; getNotificationList(): Promise; delNotification(id: string): Promise; delAllNotifications(): Promise; delAllNotificationEvents(): Promise; - delSubscription(id: string): Promise; - getMoiraStatus(): Promise; + getNotifierState(): Promise; + setNotifierState(status: NotifierState): Promise; } export default class MoiraApi implements IMoiraApi { @@ -179,15 +180,6 @@ export default class MoiraApi implements IMoiraApi { return response.json(); } - async deleteSubscription(subscriptionId: string): Promise { - const url = this.apiUrl + "/subscription/" + subscriptionId; - const response = await fetch(url, { - method: "DELETE", - credentials: "same-origin", - }); - await this.checkStatus(response); - } - async testSubscription(subscriptionId: string): Promise { const url = this.apiUrl + "/subscription/" + subscriptionId + "/test"; const response = await fetch(url, { @@ -318,8 +310,11 @@ export default class MoiraApi implements IMoiraApi { await this.checkStatus(response); } - async setMaintenance(triggerId: string, data: { [metric: string]: number }): Promise { - const url = this.apiUrl + "/trigger/" + encodeURI(triggerId) + "/maintenance"; + async setMaintenance( + triggerId: string, + data: { trigger?: number, metrics?: { [metric: string]: number } } + ): Promise { + const url = this.apiUrl + "/trigger/" + encodeURI(triggerId) + "/setMaintenance"; const response = await fetch(url, { method: "PUT", body: JSON.stringify(data), @@ -366,6 +361,15 @@ export default class MoiraApi implements IMoiraApi { await this.checkStatus(response); } + async delNoDataMetric(triggerId: string): Promise { + const url = this.apiUrl + "/trigger/" + encodeURI(triggerId) + "/metrics/nodata"; + const response = await fetch(url, { + method: "DELETE", + credentials: "same-origin", + }); + await this.checkStatus(response); + } + async getNotificationList(): Promise { const url = this.apiUrl + "/notification?start=0&end=-1"; const response = await fetch(url, { @@ -403,8 +407,8 @@ export default class MoiraApi implements IMoiraApi { await this.checkStatus(response); } - async delSubscription(id: string): Promise { - const url = this.apiUrl + "/subscription/" + encodeURI(id); + async delSubscription(subscriptionId: string): Promise { + const url = this.apiUrl + "/subscription/" + encodeURI(subscriptionId); const response = await fetch(url, { method: "DELETE", credentials: "same-origin", @@ -412,7 +416,7 @@ export default class MoiraApi implements IMoiraApi { await this.checkStatus(response); } - async getMoiraStatus(): Promise { + async getNotifierState(): Promise { const url = this.apiUrl + "/health/notifier"; const response = await fetch(url, { method: "GET", @@ -421,4 +425,15 @@ export default class MoiraApi implements IMoiraApi { await this.checkStatus(response); return response.json(); } + + async setNotifierState(status: NotifierState): Promise { + const url = this.apiUrl + "/health/notifier"; + const response = await fetch(url, { + method: "PUT", + credentials: "same-origin", + body: JSON.stringify(status), + }); + await this.checkStatus(response); + return response.json(); + } } diff --git a/src/Components/ContactEditForm/ContactEditForm.js b/src/Components/ContactEditForm/ContactEditForm.js index 79fcd1c15..ea4038b91 100644 --- a/src/Components/ContactEditForm/ContactEditForm.js +++ b/src/Components/ContactEditForm/ContactEditForm.js @@ -3,7 +3,7 @@ import * as React from "react"; import Input from "retail-ui/components/Input"; import Select from "retail-ui/components/Select"; import { ValidationWrapperV1, tooltip, type ValidationInfo } from "react-ui-validations"; -import { getContactTypeCaption } from "../../Domain/ContactType"; +import { ContactTypes, getContactTypeCaption } from "../../Domain/ContactType"; import type { ContactConfig } from "../../Domain/Config"; import validateContact from "../../Helpers/ContactValidator"; import ContactTypeIcon from "../ContactTypeIcon/ContactTypeIcon"; @@ -35,19 +35,19 @@ export default class ContactEditForm extends React.Component { return ""; } const contactType = contactConfig.type; - if (contactType === "telegram") { + if (contactType === ContactTypes.telegram) { return "Enter telegram #channel, @username or group"; } - if (contactType === "twilio sms" || contactType === "twilio voice") { + if (contactType === ContactTypes["twilio sms"] || contactType === ContactTypes["twilio voice"]) { return "Enter your phone number (e.g. +79.......)"; } - if (contactType === "pushover") { + if (contactType === ContactTypes.pushover) { return "Enter your pushover user key"; } - if (contactType === "slack") { + if (contactType === ContactTypes.slack) { return "Enter slack #channel or @username"; } - if (contactType === "email") { + if (contactType === ContactTypes.email) { return "Enter email address"; } if (contactConfig.title != null) { diff --git a/src/Components/ContactList/ContactList.js b/src/Components/ContactList/ContactList.js index 1e6c4c2a0..60950ab01 100644 --- a/src/Components/ContactList/ContactList.js +++ b/src/Components/ContactList/ContactList.js @@ -44,7 +44,7 @@ export default class ContactList extends React.Component { } try { const contact = await onAddContact(newContact); - if (contact != null) { + if (contact !== null) { await onTestContact(contact); } } finally { @@ -179,7 +179,7 @@ export default class ContactList extends React.Component {
- To start receive notifications you have to{" "} + To start receiving notifications you have to{" "} add delivery channel for notifications.
diff --git a/src/Components/ContactTypeIcon/ContactTypeIcon.js b/src/Components/ContactTypeIcon/ContactTypeIcon.js index 9b422a37d..914d5bddf 100644 --- a/src/Components/ContactTypeIcon/ContactTypeIcon.js +++ b/src/Components/ContactTypeIcon/ContactTypeIcon.js @@ -1,5 +1,6 @@ // @flow import * as React from "react"; +import { ContactTypes } from "../../Domain/ContactType"; import Icon from "retail-ui/components/Icon"; import SvgIcon from "../SvgIcon/SvgIcon"; import PushoverLogo from "./pushover-logo.svg"; @@ -11,22 +12,22 @@ type Props = { }; export default function ContactTypeIcon({ type }: Props): React.Element { - if (type === "telegram") { + if (type === ContactTypes.telegram) { return ; } if (type.includes("phone")) { return ; } - if (type === "pushover") { + if (type === ContactTypes.pushover) { return ; } - if (type === "slack") { + if (type === ContactTypes.slack) { return ; } - if (type === "twilio voice") { + if (type === ContactTypes["twilio voice"]) { return ; } - if (type === "twilio sms") { + if (type === ContactTypes["twilio sms"]) { return ; } if (type.includes("sms")) { diff --git a/src/Components/Layout/Layout.js b/src/Components/Layout/Layout.js index 88c4dd628..0af87b9ce 100644 --- a/src/Components/Layout/Layout.js +++ b/src/Components/Layout/Layout.js @@ -45,7 +45,7 @@ export default class Layout extends React.Component { ); }; - static Paging = function Paging({ children }: PagingProps): React.Node { + static Footer = function Paging({ children }: PagingProps): React.Node { return (
{children}
@@ -73,4 +73,4 @@ export default class Layout extends React.Component { export const LayoutTitle = Layout.Title; export const LayoutPlate = Layout.Plate; export const LayoutContent = Layout.Content; -export const LayoutPaging = Layout.Paging; +export const LayoutFooter = Layout.Footer; diff --git a/src/Components/MetricList/MetricList.js b/src/Components/MetricList/MetricList.js index 5a820a720..fe95db5de 100644 --- a/src/Components/MetricList/MetricList.js +++ b/src/Components/MetricList/MetricList.js @@ -23,15 +23,16 @@ type Props = {| onSort?: (sorting: SortingColum) => void, onChange: (maintenance: Maintenance, metric: string) => void, onRemove: (metric: string) => void, + onNoDataRemove?: () => void, |}; function checkMaintenance(maintenance: ?number): React.Node { const delta = (maintenance || 0) - moment.utc().unix(); - return
{delta <= 0 ? "Maintenance" : moment.duration(delta * 1000).humanize()}
; + return {delta <= 0 ? "Maintenance" : moment.duration(delta * 1000).humanize()}; } export default function MetricList(props: Props): React.Node { - const { status, items, onSort, onChange, onRemove, sortingColumn, sortingDown } = props; + const { status, items, onSort, onChange, onRemove, onNoDataRemove, sortingColumn, sortingDown } = props; const sortingIcon = sortingDown ? "ArrowBoldDown" : "ArrowBoldUp"; return ( @@ -68,7 +69,15 @@ export default function MetricList(props: Props): React.Node { )}
-
+
+ {onNoDataRemove && ( + + + + )} +
{Object.keys(items).map(metric => { @@ -91,9 +100,11 @@ export default function MetricList(props: Props): React.Node { ))} - + + +
); diff --git a/src/Components/MetricList/MetricList.less b/src/Components/MetricList/MetricList.less index e91ae1f13..abeff3ca9 100644 --- a/src/Components/MetricList/MetricList.less +++ b/src/Components/MetricList/MetricList.less @@ -19,6 +19,8 @@ } .header { + padding-bottom: 2px; + border-bottom: 1px solid rgba(0, 0, 0, 0.15); color: #666; font-style: italic; } @@ -60,13 +62,20 @@ } .controls { + display: flex; + align-items: baseline; + justify-content: flex-end; flex-shrink: 0; - width: 210px; + width: 270px; +} - .caption { - width: 80px; - text-align: left; - } +.delete-all { + height: 20px; +} + +.delete-all, +.delete-metric { + width: 134px; } .sorting { diff --git a/src/Components/Mobile/MobileMetricsList/MobileMetricsList.js b/src/Components/Mobile/MobileMetricsList/MobileMetricsList.js index 24e3235dc..828b99338 100644 --- a/src/Components/Mobile/MobileMetricsList/MobileMetricsList.js +++ b/src/Components/Mobile/MobileMetricsList/MobileMetricsList.js @@ -22,6 +22,7 @@ export default function MobileMetricsList(props: Props): React.Node {
{Object.keys(metrics).map(x => ( onRemove(x)} diff --git a/src/Components/Mobile/MobileMetricsListItem/MobileMetricsListItem.js b/src/Components/Mobile/MobileMetricsListItem/MobileMetricsListItem.js index 9e73c8d29..ca6565752 100644 --- a/src/Components/Mobile/MobileMetricsListItem/MobileMetricsListItem.js +++ b/src/Components/Mobile/MobileMetricsListItem/MobileMetricsListItem.js @@ -100,7 +100,7 @@ export default class MobileMetricsListItem extends React.Component this.setState({ buttonsState: "Default" })}>
-
Maintenance
+
Maintenance metric
this.handleSetMaintenance(Maintenances.off)} className={cn("modal-button")}> @@ -136,6 +136,16 @@ export default class MobileMetricsListItem extends React.Component className={cn("modal-button")}> 1 WEEK
+
this.handleSetMaintenance(Maintenances.twoWeeks)} + className={cn("modal-button")}> + 2 WEEKS +
+
this.handleSetMaintenance(Maintenances.oneMonth)} + className={cn("modal-button")}> + 1 MONTH +
diff --git a/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.js b/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.js index 82f499c98..5ccb8f3b0 100644 --- a/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.js +++ b/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.js @@ -3,11 +3,13 @@ import * as React from "react"; import moment from "moment"; import Sticky from "retail-ui/components/Sticky"; import Icon from "retail-ui/components/Icon"; +import Modal from "retail-ui/components/Modal"; import type { Schedule } from "../../../Domain/Schedule"; import { getPageLink } from "../../../Domain/Global"; import type { Status } from "../../../Domain/Status"; import type { Trigger, TriggerState } from "../../../Domain/Trigger"; +import { Maintenances, type Maintenance } from "../../../Domain/Maintenance"; import { Statuses } from "../../../Domain/Status"; import getStatusColor, { unknownColor } from "../Styles/StatusColor"; @@ -20,6 +22,7 @@ type Props = {| triggerState: ?TriggerState, loading?: boolean, onThrottlingRemove: () => void, + onSetMaintenance: (maintenancesInterval: Maintenance) => void, |}; type State = { @@ -45,10 +48,16 @@ function ScheduleView(props: { data: Schedule }): React.Node { ); } +function checkMaintenance(maintenance: ?number): React.Node { + const delta = (maintenance || 0) - moment.utc().unix(); + return {delta <= 0 ? "Maintenance" : moment.duration(delta * 1000).humanize()}; +} + export default class MobileTriggerInfo extends React.Component { props: Props; state: State = { showThrottling: false, + showMaintenance: false, }; getWorstTriggerState(): ?Status { @@ -91,58 +100,132 @@ export default class MobileTriggerInfo extends React.Component { onThrottlingRemove(); }; + handleSetMaintenance = (interval: Maintenance) => { + const { onSetMaintenance } = this.props; + this.setState({ showMaintenance: false }); + onSetMaintenance(interval); + }; + render(): React.Node { const { data: trigger, triggerState } = this.props; - const { showThrottling } = this.state; + const { showThrottling, showMaintenance } = this.state; const { sched } = trigger || {}; - const { msg } = triggerState || {}; + const { msg, maintenance } = triggerState || {}; return ( - - - - - {trigger != null ? trigger.name : "Loading trigger..."} - - - - {trigger != null && ( -
-
{trigger.desc && trigger.desc}
- {sched != null && ( -
-
Schedule:
-
- +
+ + + + + + {trigger != null ? trigger.name : "Loading trigger..."} + + this.setState({ showMaintenance: true })} + /> + + + + {trigger != null && ( +
+
{trigger.desc && trigger.desc}
+ {sched != null && ( +
+
Schedule:
+
+ +
+ )} +
+
Tags:
+
{trigger.tags.map(x => `#${x}`).join(", ")}
- )} -
-
Tags:
-
{trigger.tags.map(x => `#${x}`).join(", ")}
-
- {(trigger.throttling !== 0 || showThrottling) && ( -
- {" "} - {trigger.throttling !== 0 ? "Throttling enabled." : "No Throttling."}{" "} - - Disable - -
- )} - {msg != null && - msg !== "" && ( + {maintenance && (
-
Exception:
-
{msg}
+
Maintenance:
+
{checkMaintenance(maintenance)}
+
+ )} + {(trigger.throttling !== 0 || showThrottling) && ( +
+ {" "} + {trigger.throttling !== 0 ? "Throttling enabled." : "No Throttling."}{" "} + + Disable +
)} -
- )} -
-
+ {msg != null && + msg !== "" && ( +
+
Exception:
+
{msg}
+
+ )} +
+ )} + + + {showMaintenance && ( + this.setState({ showMaintenance: false })}> + +
+
Maintenance trigger
+
this.handleSetMaintenance(Maintenances.off)} + className={cn("modal-button")}> + OFF +
+
this.handleSetMaintenance(Maintenances.quarterHour)} + className={cn("modal-button")}> + 15 MIN +
+
this.handleSetMaintenance(Maintenances.oneHour)} + className={cn("modal-button")}> + 1 HOUR +
+
this.handleSetMaintenance(Maintenances.threeHours)} + className={cn("modal-button")}> + 3 HOURS +
+
this.handleSetMaintenance(Maintenances.sixHours)} + className={cn("modal-button")}> + 6 HOURS +
+
this.handleSetMaintenance(Maintenances.oneDay)} + className={cn("modal-button")}> + 1 DAY +
+
this.handleSetMaintenance(Maintenances.oneWeek)} + className={cn("modal-button")}> + 1 WEEK +
+
this.handleSetMaintenance(Maintenances.twoWeeks)} + className={cn("modal-button")}> + 2 WEEKS +
+
this.handleSetMaintenance(Maintenances.oneMonth)} + className={cn("modal-button")}> + 1 MONTH +
+
+
+
+ )} +
); } } diff --git a/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.less b/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.less index 624c70f99..6189296f1 100644 --- a/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.less +++ b/src/Components/Mobile/MobileTriggerInfo/MobileTriggerInfo.less @@ -24,7 +24,7 @@ flex-direction: row; .caption { - flex: 0 0 80px; + flex: 0 0 100px; color: rgba(255, 255, 255, 0.6); } @@ -58,3 +58,23 @@ } } } + +@button-color: #418eef; + +.modal-content { + min-width: 300px; + margin: 0 -35px -26px -30px; + + .modal-header { + font-size: 16px; + padding: 10px 15px; + font-weight: 600; + } + + .modal-button { + font-size: 16px; + padding: 10px 15px; + color: @button-color; + font-weight: 600; + } +} diff --git a/src/Components/Mobile/MobileTriggerInfoPage/MobileTriggerInfoPage.js b/src/Components/Mobile/MobileTriggerInfoPage/MobileTriggerInfoPage.js index 006481fa8..3ae40700d 100644 --- a/src/Components/Mobile/MobileTriggerInfoPage/MobileTriggerInfoPage.js +++ b/src/Components/Mobile/MobileTriggerInfoPage/MobileTriggerInfoPage.js @@ -21,7 +21,8 @@ type Props = {| metrics: ?{ [metric: string]: Metric }, loading?: boolean, onRemoveMetric: (metricName: string) => void, - onSetMaintenance: (metricName: string, maintenancesInterval: Maintenance) => void, + onSetMetricMaintenance: (metricName: string, maintenancesInterval: Maintenance) => void, + onSetTriggerMaintenance: (maintenancesInterval: Maintenance) => void, onThrottlingRemove: () => void, |}; @@ -51,7 +52,7 @@ export default class MobileTriggerInfoPage extends React.Component { {Object.keys(Statuses) .filter(x => counts[x]) .map(status => ( - + {status}:{" "} {counts[status]} @@ -65,11 +66,12 @@ export default class MobileTriggerInfoPage extends React.Component { render(): React.Node { const { data: trigger, - onSetMaintenance, + onSetMetricMaintenance, triggerState, loading, onRemoveMetric, onThrottlingRemove, + onSetTriggerMaintenance, metrics, } = this.props; @@ -80,6 +82,7 @@ export default class MobileTriggerInfoPage extends React.Component { triggerState={triggerState} loading={loading} onThrottlingRemove={onThrottlingRemove} + onSetMaintenance={onSetTriggerMaintenance} />
{trigger == null && loading && }
@@ -93,7 +96,7 @@ export default class MobileTriggerInfoPage extends React.Component { )}
diff --git a/src/Components/Mobile/MobileTriggerListItem/MobileTriggerListItem.js b/src/Components/Mobile/MobileTriggerListItem/MobileTriggerListItem.js index d6cd00aa8..a07d93fd2 100644 --- a/src/Components/Mobile/MobileTriggerListItem/MobileTriggerListItem.js +++ b/src/Components/Mobile/MobileTriggerListItem/MobileTriggerListItem.js @@ -84,14 +84,12 @@ export default class TriggerListItem extends React.Component { ); const notOkStatuses = metricStatuses.filter(x => x !== Statuses.OK); let statuses; - if (triggerStatus === Statuses.EXCEPTION) { - statuses = [Statuses.EXCEPTION]; - } else if (metricStatuses.length === 0) { + if (triggerStatus && (triggerStatus !== Statuses.OK || metricStatuses.length === 0)) { statuses = [triggerStatus]; - } else if (notOkStatuses.length === 0) { - statuses = [Statuses.OK]; - } else { + } else if (notOkStatuses.length !== 0) { statuses = notOkStatuses; + } else { + statuses = [Statuses.OK]; } return ; } diff --git a/src/Components/Mobile/MobileTriggerListPage/MobileTriggerListPage.js b/src/Components/Mobile/MobileTriggerListPage/MobileTriggerListPage.js index 9ecf579bb..b4a0038c4 100644 --- a/src/Components/Mobile/MobileTriggerListPage/MobileTriggerListPage.js +++ b/src/Components/Mobile/MobileTriggerListPage/MobileTriggerListPage.js @@ -87,7 +87,8 @@ export default class MobileTriggerListPage extends React.Component
{triggers == null && loading && } - {triggers != null && triggers.map(trigger => )} + {triggers != null && + triggers.map(trigger => )} {triggers != null && loading && (
diff --git a/src/Components/NotificationList/NotificationList.js b/src/Components/NotificationList/NotificationList.js index 1b2815a03..55da3eae4 100644 --- a/src/Components/NotificationList/NotificationList.js +++ b/src/Components/NotificationList/NotificationList.js @@ -8,29 +8,15 @@ import type { Notification } from "../../Domain/Notification"; import { getPageLink } from "../../Domain/Global"; import RouterLink from "../RouterLink/RouterLink"; import cn from "./NotificationList.less"; +import ContactTypeIcon from "../ContactTypeIcon/ContactTypeIcon"; type Props = {| items: { [id: string]: Notification }, onRemove: (key: string) => void, - onRemoveAll: () => void, - onRemoveEvents: () => void, |}; export default function NotificationList(props: Props): React.Element { - const { items, onRemove, onRemoveAll, onRemoveEvents } = props; - - function renderContactIcon(type: string): React.Node { - let name; - switch (type) { - case "telegram": - name = "Telegram2"; - break; - default: - name = "Mail2"; - break; - } - return ; - } + const { items, onRemove } = props; return Object.keys(items).length === 0 ? (
Empty :-)
@@ -52,10 +38,14 @@ export default function NotificationList(props: Props): React.Element {
{moment.unix(timestamp).format("MMMM D, HH:mm:ss")}
- {name} + {id ? ( + {name} + ) : ( + + )}
- {renderContactIcon(type)} {value} + {value}
{throttled ? : } @@ -69,14 +59,6 @@ export default function NotificationList(props: Props): React.Element {
); })} - - - - ); } diff --git a/src/Components/SubscriptionEditModal/SubscriptionEditModal.js b/src/Components/SubscriptionEditModal/SubscriptionEditModal.js index 9ab93dd7f..3ca0ac7ca 100644 --- a/src/Components/SubscriptionEditModal/SubscriptionEditModal.js +++ b/src/Components/SubscriptionEditModal/SubscriptionEditModal.js @@ -14,7 +14,6 @@ type Props = { tags: Array, contacts: Array, onChange: ($Shape) => void, - onCancel: () => void, onRemoveSubscription: Subscription => Promise, onUpdateSubscription: Subscription => Promise, diff --git a/src/Components/SubscriptionEditor/SubscriptionEditor.js b/src/Components/SubscriptionEditor/SubscriptionEditor.js index 20c4a1770..5b5df4be4 100644 --- a/src/Components/SubscriptionEditor/SubscriptionEditor.js +++ b/src/Components/SubscriptionEditor/SubscriptionEditor.js @@ -1,5 +1,6 @@ // @flow import * as React from "react"; +import Toggle from "retail-ui/components/Toggle"; import Checkbox from "retail-ui/components/Checkbox"; import Link from "retail-ui/components/Link"; import Tooltip from "retail-ui/components/Tooltip"; @@ -20,6 +21,10 @@ export type SubscriptionInfo = { enabled: boolean, ignore_warnings: boolean, ignore_recoverings: boolean, + plotting?: { + enabled: boolean, + theme: "light" | "dark", + }, }; type Props = { @@ -108,6 +113,7 @@ export default class SubscriptionEditor extends React.Component { render(): React.Node { const { subscription, contacts, onChange, tags } = this.props; + const { plotting = { enabled: true, theme: "light" } } = subscription; return (
@@ -200,6 +206,33 @@ export default class SubscriptionEditor extends React.Component {
+
+ onChange({ plotting: { ...plotting, enabled: checked } })}> + Add graph to notification + + {plotting.enabled && ( +
+ + onChange({ + plotting: { + ...plotting, + theme: plotting.theme === "dark" ? "light" : "dark", + }, + }) + }> + Light + + + + Dark + +
+ )} +
onChange({ enabled: checked })}> Enabled diff --git a/src/Components/SubscriptionEditor/SubscriptionEditor.less b/src/Components/SubscriptionEditor/SubscriptionEditor.less index 75b51f881..77b7db081 100644 --- a/src/Components/SubscriptionEditor/SubscriptionEditor.less +++ b/src/Components/SubscriptionEditor/SubscriptionEditor.less @@ -18,4 +18,20 @@ } } } + + .row-options { + padding-left: 26px; + padding-top: 5px; + } + + .graph-theme-switcher { + display: inline-flex; + align-items: flex-start; + cursor: pointer; + } + + .graph-theme-toggle { + margin-left: 5px; + margin-right: 5px; + } } diff --git a/src/Components/SubscriptionList/SubscriptionList.js b/src/Components/SubscriptionList/SubscriptionList.js index ce9a2eb93..78c3d47dc 100644 --- a/src/Components/SubscriptionList/SubscriptionList.js +++ b/src/Components/SubscriptionList/SubscriptionList.js @@ -60,6 +60,10 @@ export default class SubscriptionList extends React.Component { enabled: true, ignore_recoverings: false, ignore_warnings: false, + plotting: { + enabled: true, + theme: "light", + }, }, }); }; @@ -77,6 +81,25 @@ export default class SubscriptionList extends React.Component { }); }; + handleCreateAndTestSubscription = async () => { + const { onAddSubscription, onTestSubscription } = this.props; + const { newSubscription } = this.state; + if (newSubscription == null) { + throw new Error("InvalidProgramState"); + } + try { + const subscription = await onAddSubscription(newSubscription); + if (subscription !== null) { + await onTestSubscription(subscription); + } + } finally { + this.setState({ + newSubscriptionModalVisible: false, + newSubscription: null, + }); + } + }; + handleUpdateSubscription = async () => { const { onUpdateSubscription } = this.props; const { subscriptionToEdit } = this.state; @@ -151,7 +174,7 @@ export default class SubscriptionList extends React.Component {
- To start receive notifications you have to{" "} + To start receiving notifications you have to{" "} add subscription.
@@ -202,7 +225,7 @@ export default class SubscriptionList extends React.Component { onChange={update => this.setState({ newSubscription: { ...newSubscription, ...update } })} onCancel={() => this.setState({ newSubscriptionModalVisible: false })} onCreateSubscription={this.handleCreateSubscription} - onCreateAndTestSubscription={this.handleCreateSubscription} + onCreateAndTestSubscription={this.handleCreateAndTestSubscription} /> )} {subscriptionEditModalVisible && diff --git a/src/Components/TagDropdownSelect/TagDropdownSelect.js b/src/Components/TagDropdownSelect/TagDropdownSelect.js index 84ac4b944..57347234b 100644 --- a/src/Components/TagDropdownSelect/TagDropdownSelect.js +++ b/src/Components/TagDropdownSelect/TagDropdownSelect.js @@ -94,7 +94,9 @@ export default class TagDropdownSelect extends React.Component { } case "Enter": if (focusedIndex !== 0) { - if ( + if (inputValue.trim() === "") { + break; + } else if ( allowCreateNewTags && !this.tagExists(inputValue) && focusedIndex === filtredTags.length + 1 @@ -105,10 +107,14 @@ export default class TagDropdownSelect extends React.Component { } } if (focusedIndex === 0) { - if (allowCreateNewTags && !this.tagExists(inputValue)) { + if (inputValue.trim() === "") { + break; + } else if (allowCreateNewTags && !this.tagExists(inputValue)) { this.selectTag(inputValue); - } else { + } else if (filtredTags.length > 0) { this.selectTag(filtredTags[filtredTags.length - 1]); + } else { + break; } } this.setState({ inputValue: "" }); diff --git a/src/Components/TagList/TagList.js b/src/Components/TagList/TagList.js index 4579a97bd..bf204ea6f 100644 --- a/src/Components/TagList/TagList.js +++ b/src/Components/TagList/TagList.js @@ -6,6 +6,7 @@ import type { Contact } from "../../Domain/Contact"; import Button from "retail-ui/components/Button"; import Icon from "retail-ui/components/Icon"; import cn from "./TagList.less"; +import ContactTypeIcon from "../ContactTypeIcon/ContactTypeIcon"; type Props = ReactExactProps<{ items: Array, @@ -53,19 +54,6 @@ class TagListItem extends React.Component { showInfo: false, }; - renderContactIcon(type: string): React.Node { - let name; - switch (type) { - case "telegram": - name = "Telegram2"; - break; - default: - name = "Mail2"; - break; - } - return ; - } - render(): React.Node { const { data, allContacts, onRemove, onRemoveContact } = this.props; const { showInfo } = this.state; @@ -97,7 +85,7 @@ class TagListItem extends React.Component { {flatten(contacts.map(x => allContacts.filter(y => y.id === x))).map( ({ id, type, value }) => (
- {this.renderContactIcon(type)} {value} + {value}
) )} diff --git a/src/Components/TriggerEditForm/TriggerEditForm.js b/src/Components/TriggerEditForm/TriggerEditForm.js index 59580da21..656bcfae2 100644 --- a/src/Components/TriggerEditForm/TriggerEditForm.js +++ b/src/Components/TriggerEditForm/TriggerEditForm.js @@ -23,6 +23,7 @@ import { Statuses } from "../../Domain/Status"; import CodeRef from "../CodeRef/CodeRef"; import { defaultNumberEditFormat, defaultNumberViewFormat } from "../../Helpers/Formats"; import cn from "./TriggerEditForm.less"; +import Checkbox from "retail-ui/components/Checkbox/Checkbox"; type Props = {| data: $Shape, @@ -142,6 +143,18 @@ export default class TriggerEditForm extends React.Component { ); }; + renderNewMetricsAlertingHelp = () => { + return ( +
+

If disabled, Moira will notify you about new metrics.

+

+ In this case when you start sending new metric you will receive NODATA -{" "} + OK notification. +

+
+ ); + }; + render(): React.Node { const { advancedMode } = this.state; const { data, onChange, tags: allTags, remoteAllowed } = this.props; @@ -156,6 +169,7 @@ export default class TriggerEditForm extends React.Component { sched, is_remote: isRemote, trigger_type: triggerType, + mute_new_metrics: muteNewMetrics, } = data; if (sched == null) { throw new Error("InvalidProgramState"); @@ -268,6 +282,17 @@ export default class TriggerEditForm extends React.Component { onChange={(e, value) => onChange({ ttl: value || 0 })} /> + seconds + + + onChange({ mute_new_metrics: checked })}> + Mute new metrics notifications + + + + onChange({ sched: schedule })} /> diff --git a/src/Components/TriggerEditForm/TriggerEditForm.less b/src/Components/TriggerEditForm/TriggerEditForm.less index 102d847f5..9410adb3f 100644 --- a/src/Components/TriggerEditForm/TriggerEditForm.less +++ b/src/Components/TriggerEditForm/TriggerEditForm.less @@ -66,7 +66,7 @@ } } -.days { +.days, .new-metrics { margin-bottom: 15px; display: flex; align-items: center; @@ -98,3 +98,16 @@ margin-top: 10px; font-size: 12px; } + +.new-metrics-help { + max-width: 400px; + + p { + padding-top: 10px; + margin-bottom: 0; + + &:first-child { + margin-top: 0; + } + } +} \ No newline at end of file diff --git a/src/Components/TriggerInfo/TriggerInfo.js b/src/Components/TriggerInfo/TriggerInfo.js index dc3f4a23f..f7f16e844 100644 --- a/src/Components/TriggerInfo/TriggerInfo.js +++ b/src/Components/TriggerInfo/TriggerInfo.js @@ -3,13 +3,15 @@ import * as React from "react"; import moment from "moment"; import type { Trigger, TriggerState } from "../../Domain/Trigger"; import type { Schedule } from "../../Domain/Schedule"; +import type { Maintenance } from "../../Domain/Maintenance"; +import { Maintenances, getMaintenanceCaption } from "../../Domain/Maintenance"; import { getPageLink } from "../../Domain/Global"; import RouterLink from "../RouterLink/RouterLink"; import Link from "retail-ui/components/Link"; import Icon from "retail-ui/components/Icon"; -import Button from "retail-ui/components/Button"; +import Dropdown from "retail-ui/components/Dropdown"; +import MenuItem from "retail-ui/components/MenuItem"; import TagGroup from "../TagGroup/TagGroup"; -import { getJSONContent } from "../../helpers"; import cn from "./TriggerInfo.less"; type Props = {| @@ -17,8 +19,19 @@ type Props = {| triggerState: TriggerState, supportEmail: string, onThrottlingRemove: (triggerId: string) => void, + onSetMaintenance: (maintenance: Maintenance) => void, |}; +function checkMaintenance(maintenance: ?number): React.Node { + const delta = (maintenance || 0) - moment.utc().unix(); + return ( + +   + {delta <= 0 ? "Maintenance" : moment.duration(delta * 1000).humanize()} + + ); +} + function ScheduleView(props: { data: Schedule }): React.Node { const { days, startOffset, endOffset } = props.data; const enabledDays = days.filter(({ enabled }) => enabled); @@ -38,7 +51,13 @@ function ScheduleView(props: { data: Schedule }): React.Node { ); } -export default function TriggerInfo({ data, triggerState, supportEmail, onThrottlingRemove }: Props): React.Node { +export default function TriggerInfo({ + data, + triggerState, + supportEmail, + onThrottlingRemove, + onSetMaintenance, +}: Props): React.Node { const { id, name, @@ -54,7 +73,7 @@ export default function TriggerInfo({ data, triggerState, supportEmail, onThrott throttling, is_remote: isRemote, } = data; - const { state, msg: exceptionMessage } = triggerState; + const { state, msg: exceptionMessage, maintenance } = triggerState; const hasExpression = expression != null && expression !== ""; const hasMultipleTargets = targets.length > 1; @@ -72,19 +91,16 @@ export default function TriggerInfo({ data, triggerState, supportEmail, onThrott Edit - { - const target = event.currentTarget; - if (target instanceof HTMLAnchorElement) { - target.href = getJSONContent(data); - } - }} - download={`trigger-${id}.json`}> - - + + Duplicate + + + {Object.keys(Maintenances).map(key => ( + onSetMaintenance(key)}> + {getMaintenanceCaption(key)} + + ))} +
@@ -101,7 +117,12 @@ export default function TriggerInfo({ data, triggerState, supportEmail, onThrott )} {expression &&
Expression
} - {expression &&
{expression}
} + {expression && ( +
+ {`${expression}. `} + Set {ttlState} if has no value for {ttl} seconds +
+ )} {sched &&
Schedule
} {sched && (
@@ -112,30 +133,27 @@ export default function TriggerInfo({ data, triggerState, supportEmail, onThrott
- {state === "EXCEPTION" || (state === "ERROR" &&
)} - {state === "EXCEPTION" || - (state === "ERROR" && ( -
-
- Trigger in {state} state.{" "} - {exceptionMessage} -
-
- Please verify trigger target{hasMultipleTargets - ? "s" - : ""} - {hasExpression ? " and expression" : ""} on{" "} - trigger edit page. - {supportEmail != null && ( - - {" "} - Or contact with server - administrator. - - )} -
-
- ))} + {(state === "EXCEPTION" || state === "ERROR") &&
} + {(state === "EXCEPTION" || state === "ERROR") && ( +
+
+ Trigger in {state} state.{" "} + {exceptionMessage} +
+
+ Please verify trigger target + {hasMultipleTargets ? "s" : ""} + {hasExpression ? " and expression" : ""} on{" "} + trigger edit page. + {supportEmail != null && ( + + {" "} + Or contact with server administrator. + + )} +
+
+ )}
); diff --git a/src/Components/TriggerListItem/TriggerListItem.js b/src/Components/TriggerListItem/TriggerListItem.js index 2ea2544d1..c9a004990 100644 --- a/src/Components/TriggerListItem/TriggerListItem.js +++ b/src/Components/TriggerListItem/TriggerListItem.js @@ -7,7 +7,7 @@ import type { Trigger } from "../../Domain/Trigger.js"; import type { Status } from "../../Domain/Status"; import type { Metric, MetricList } from "../../Domain/Metric"; import type { Maintenance } from "../../Domain/Maintenance"; -import { Statuses, getStatusColor, getStatusCaption } from "../../Domain/Status"; +import { Statuses, StatusesInOrder, getStatusColor, getStatusCaption } from "../../Domain/Status"; import Icon from "retail-ui/components/Icon"; import RouterLink from "../RouterLink/RouterLink"; import StatusIndicator from "../StatusIndicator/StatusIndicator"; @@ -91,11 +91,10 @@ export default class TriggerListItem extends React.Component { } renderCounters(): React.Node { - const counters = Object.keys(Statuses) - .map(status => ({ - status, - count: Object.keys(this.filterMetricsByStatus(status)).length, - })) + const counters = StatusesInOrder.map(status => ({ + status, + count: Object.keys(this.filterMetricsByStatus(status)).length, + })) .filter(({ count }) => count !== 0) .map(({ status, count }) => ( @@ -119,19 +118,15 @@ export default class TriggerListItem extends React.Component { renderStatus(): React.Node { const { state: triggerStatus } = this.props.data.last_check || {}; - const metricStatuses = Object.keys(Statuses).filter( - x => Object.keys(this.filterMetricsByStatus(x)).length !== 0 - ); + const metricStatuses = StatusesInOrder.filter(x => Object.keys(this.filterMetricsByStatus(x)).length !== 0); const notOkStatuses = metricStatuses.filter(x => x !== Statuses.OK); let statuses; - if (triggerStatus === Statuses.EXCEPTION) { - statuses = [Statuses.EXCEPTION]; - } else if (metricStatuses.length === 0) { + if (triggerStatus && (triggerStatus !== Statuses.OK || metricStatuses.length === 0)) { statuses = [triggerStatus]; - } else if (notOkStatuses.length === 0) { - statuses = [Statuses.OK]; - } else { + } else if (notOkStatuses.length !== 0) { statuses = notOkStatuses; + } else { + statuses = [Statuses.OK]; } return (
@@ -147,9 +142,8 @@ export default class TriggerListItem extends React.Component { return (
Trigger in EXCEPTION state. Please{" "} - verify trigger target{hasMultipleTargets - ? "s" - : ""} + verify trigger target + {hasMultipleTargets ? "s" : ""} {hasExpression ? " and expression" : ""} on{" "} trigger edit page.{" "} See more details on trigger page. @@ -162,7 +156,7 @@ export default class TriggerListItem extends React.Component { if (!onChange || !onRemove) { return null; } - const statuses = Object.keys(Statuses).filter(x => Object.keys(this.filterMetricsByStatus(x)).length !== 0); + const statuses = StatusesInOrder.filter(x => Object.keys(this.filterMetricsByStatus(x)).length !== 0); if (statuses.length === 0) { return null; } diff --git a/src/Components/TriggerSimpleModeEditor/TriggerSimpleModeEditor.js b/src/Components/TriggerSimpleModeEditor/TriggerSimpleModeEditor.js index 9eea9a21a..3ce91b5d1 100644 --- a/src/Components/TriggerSimpleModeEditor/TriggerSimpleModeEditor.js +++ b/src/Components/TriggerSimpleModeEditor/TriggerSimpleModeEditor.js @@ -161,7 +161,7 @@ export default class TriggerSimpleModeEditor extends React.Component - WARN if T1 >={" "} + WARN if T1 ≥{" "} - ERROR if T1 >={" "} + ERROR if T1 ≥{" "} - WARN if T1 <={" "} + WARN if T1 ≤{" "} - ERROR if T1 <={" "} + ERROR if T1 ≤{" "} { state: State = { - moiraStatusMessage: null, + notifierStateMessage: null, }; async getData(): Promise { const { moiraApi } = this.props; try { - const { state, message } = await moiraApi.getMoiraStatus(); + const { state, message } = await moiraApi.getNotifierState(); switch (state) { - case MoiraStates.OK: - this.setState({ moiraStatusMessage: null }); + case MoiraServiceStates.OK: + this.setState({ notifierStateMessage: null }); break; - case MoiraStates.ERROR: - this.setState({ moiraStatusMessage: message }); + case MoiraServiceStates.ERROR: + this.setState({ notifierStateMessage: message }); break; default: break; @@ -44,10 +44,10 @@ class HeaderContainer extends React.Component { } render(): React.Node { - const { moiraStatusMessage } = this.state; + const { notifierStateMessage } = this.state; return (
- {moiraStatusMessage && } + {notifierStateMessage && }
); diff --git a/src/Containers/MobileTriggerContainer.js b/src/Containers/MobileTriggerContainer.js index 72a7536ca..7c1cf885b 100644 --- a/src/Containers/MobileTriggerContainer.js +++ b/src/Containers/MobileTriggerContainer.js @@ -59,6 +59,7 @@ class TriggerContainer extends React.Component { const { page } = this.parseLocationSearch(location.search); const { id } = match.params; if (typeof id !== "string") { + this.setState({ error: "Wrong trigger id", loading: false }); return; } try { @@ -74,7 +75,6 @@ class TriggerContainer extends React.Component { } this.setState({ - loading: false, config: config, trigger, triggerState, @@ -82,6 +82,8 @@ class TriggerContainer extends React.Component { }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -101,11 +103,27 @@ class TriggerContainer extends React.Component { this.getData(this.props); } - async setMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { + async setMetricMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { this.setState({ loading: true }); const maintenanceTime = getMaintenanceTime(maintenance); await this.props.moiraApi.setMaintenance(triggerId, { - [metric]: + metrics: { + [metric]: + maintenanceTime > 0 + ? moment + .utc() + .add(maintenanceTime, "minutes") + .unix() + : maintenanceTime, + }, + }); + } + + async setTriggerMaintenance(triggerId: string, maintenance: Maintenance): Promise { + this.setState({ loading: true }); + const maintenanceTime = getMaintenanceTime(maintenance); + await this.props.moiraApi.setMaintenance(triggerId, { + trigger: maintenanceTime > 0 ? moment .utc() @@ -113,7 +131,6 @@ class TriggerContainer extends React.Component { .unix() : maintenanceTime, }); - this.getData(this.props); } async removeMetric(triggerId: string, metric: string): Promise { @@ -236,13 +253,23 @@ class TriggerContainer extends React.Component { this.getData(this.props); }; - handleSetMaintenance = async (metric: string, maintenanceInterval: Maintenance) => { + handleSetMetricMaintenance = async (metric: string, maintenanceInterval: Maintenance) => { const { match } = this.props; const { id } = match.params; if (typeof id !== "string") { return; } - await this.setMaintenance(id, maintenanceInterval, metric); + await this.setMetricMaintenance(id, maintenanceInterval, metric); + this.getData(this.props); + }; + + handleSetTriggerMaintenance = async (maintenanceInterval: Maintenance) => { + const { match } = this.props; + const { id } = match.params; + if (typeof id !== "string") { + return; + } + await this.setTriggerMaintenance(id, maintenanceInterval); this.getData(this.props); }; @@ -261,8 +288,11 @@ class TriggerContainer extends React.Component { onThrottlingRemove={() => { this.disableTrhrottling(); }} - onSetMaintenance={(x, y) => { - this.handleSetMaintenance(x, y); + onSetMetricMaintenance={(x, y) => { + this.handleSetMetricMaintenance(x, y); + }} + onSetTriggerMaintenance={x => { + this.handleSetTriggerMaintenance(x); }} metrics={metrics} /> diff --git a/src/Containers/MobileTriggerListContainer.js b/src/Containers/MobileTriggerListContainer.js index f39e457d7..c60e45c60 100644 --- a/src/Containers/MobileTriggerListContainer.js +++ b/src/Containers/MobileTriggerListContainer.js @@ -68,12 +68,13 @@ class TriggerListContainer extends React.Component { this.setState({ triggerList: [...(triggerList || []), ...(triggers.list || [])], loadedPage: loadedPage + 1, - loading: false, hasItems: (triggers.list || []).length > 0, subscribedTags: selectedTags, }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } }; @@ -113,7 +114,6 @@ class TriggerListContainer extends React.Component { this.setState({ config: config, - loading: false, error: null, subscriptions: subscribedTags, subscribedTags: subscribedTags, @@ -125,6 +125,8 @@ class TriggerListContainer extends React.Component { }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } diff --git a/src/Containers/NotificationListContainer.js b/src/Containers/NotificationListContainer.js index 77b8996c4..31e5cbb83 100644 --- a/src/Containers/NotificationListContainer.js +++ b/src/Containers/NotificationListContainer.js @@ -1,11 +1,15 @@ // @flow import * as React from "react"; +import Button from "retail-ui/components/Button/Button"; import type { ContextRouter } from "react-router-dom"; import type { IMoiraApi } from "../Api/MoiraAPI"; import type { Notification } from "../Domain/Notification"; import { withMoiraApi } from "../Api/MoiraApiInjection"; +import { MoiraServiceStates } from "../Domain/MoiraServiceStates"; +import Layout, { LayoutContent, LayoutTitle, LayoutFooter } from "../Components/Layout/Layout"; import NotificationList from "../Components/NotificationList/NotificationList"; -import Layout, { LayoutContent, LayoutTitle } from "../Components/Layout/Layout"; +import ToggleWithLabel from "../Components/Toggle/Toggle"; +import cn from "./NotificationListContainer.less"; type Props = ContextRouter & { moiraApi: IMoiraApi }; type State = { @@ -13,6 +17,7 @@ type State = { error: ?string, list: ?Array, total: ?number, + notifierEnabled: boolean, }; class NotificationListContainer extends React.Component { @@ -22,64 +27,91 @@ class NotificationListContainer extends React.Component { error: null, list: null, total: null, + notifierEnabled: true, }; componentDidMount() { - this.getData(this.props); + this.fetch(this.props); } - async getData(props: Props): Promise { + async fetch(props: Props): Promise { + await this.getNotifications(props); + await this.getNotifierState(props); + this.setState({ + loading: false, + }); + } + + async getNotifications(props: Props): Promise { const { moiraApi } = props; try { const notifications = await moiraApi.getNotificationList(); - this.setState({ loading: false, ...notifications }); + this.setState({ ...notifications }); } catch (error) { this.setState({ error: error.message }); } } - composeNotifications(items: Array): { [id: string]: Notification } { - return items.reduce((data, item) => { - const id: string = item.timestamp + item.contact.id + item.event.sub_id; - if (!data[id]) { - data[id] = item; - } - return data; - }, {}); + async getNotifierState(props: Props): Promise { + const { moiraApi } = props; + try { + const notifier = await moiraApi.getNotifierState(); + this.setState({ notifierEnabled: notifier && notifier.state === MoiraServiceStates.OK }); + } catch (error) { + this.setState({ error: error.message }); + } } async removeNotification(id: string): Promise { + const { moiraApi } = this.props; this.setState({ loading: true }); try { - await this.props.moiraApi.delNotification(id); - this.getData(this.props); + await moiraApi.delNotification(id); + this.getNotifications(this.props); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } async removeAllNotifications(): Promise { + const { moiraApi } = this.props; this.setState({ loading: true }); try { - await this.props.moiraApi.delAllNotifications(); - this.getData(this.props); + await moiraApi.delAllNotificationEvents(); + await moiraApi.delAllNotifications(); + this.getNotifications(this.props); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } - async removeNotificationsEvents(): Promise { - this.setState({ loading: true }); + async enableNotifier(enable: boolean): Promise { + const { moiraApi } = this.props; try { - await this.props.moiraApi.delAllNotificationEvents(); - this.getData(this.props); + const state = enable ? MoiraServiceStates.OK : MoiraServiceStates.ERROR; + await moiraApi.setNotifierState({ state: state }); + this.getNotifierState(this.props); } catch (error) { this.setState({ error: error.message }); } } + composeNotifications(items: Array): { [id: string]: Notification } { + return items.reduce((data, item) => { + const id: string = item.timestamp + item.contact.id + item.event.sub_id; + if (!data[id]) { + data[id] = item; + } + return data; + }, {}); + } + render(): React.Node { - const { loading, error, list } = this.state; + const { loading, error, list, notifierEnabled } = this.state; return ( @@ -90,15 +122,21 @@ class NotificationListContainer extends React.Component { onRemove={id => { this.removeNotification(id); }} - onRemoveAll={() => { - this.removeAllNotifications(); - }} - onRemoveEvents={() => { - this.removeNotificationsEvents(); - }} /> )} + +
+ + this.enableNotifier(checked)} + /> +
+
); } diff --git a/src/Containers/NotificationListContainer.less b/src/Containers/NotificationListContainer.less new file mode 100644 index 000000000..bd7f1bd9c --- /dev/null +++ b/src/Containers/NotificationListContainer.less @@ -0,0 +1,9 @@ +@import '~styles/variables.less'; +@import '~styles/mixins.less'; + +.actions-row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-content: center; +} diff --git a/src/Containers/PatternListContainer.js b/src/Containers/PatternListContainer.js index 79dc9a921..73850ae2c 100644 --- a/src/Containers/PatternListContainer.js +++ b/src/Containers/PatternListContainer.js @@ -27,7 +27,6 @@ class PatternListContainer extends React.Component { } componentWillReceiveProps(nextProps: Props) { - this.setState({ loading: true }); this.getData(nextProps); } @@ -35,9 +34,11 @@ class PatternListContainer extends React.Component { const { moiraApi } = props; try { const patterns = await moiraApi.getPatternList(); - this.setState({ loading: false, ...patterns }); + this.setState({ ...patterns }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } diff --git a/src/Containers/SettingsContainer.js b/src/Containers/SettingsContainer.js index 5a1123cc2..2b85a8704 100644 --- a/src/Containers/SettingsContainer.js +++ b/src/Containers/SettingsContainer.js @@ -67,9 +67,11 @@ class SettingsContainer extends React.Component { value: this.normalizeContactValueForUi(x.type, x.value), })), }; - this.setState({ loading: false, settings: settings, config: config, tags: tags }); + this.setState({ settings: settings, config: config, tags: tags }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -164,6 +166,7 @@ class SettingsContainer extends React.Component { user: settings.login, ignore_warnings: subscription.ignore_warnings, ignore_recoverings: subscription.ignore_recoverings, + plotting: subscription.plotting, }); this.setState({ settings: { @@ -171,9 +174,11 @@ class SettingsContainer extends React.Component { subscriptions: [...settings.subscriptions, newSubscriptions], }, }); + return newSubscriptions; } catch (error) { this.setState({ error: error.message }); } + return null; }; handleUpdateSubscription = async (subscription: Subscription): Promise => { @@ -204,7 +209,7 @@ class SettingsContainer extends React.Component { throw new Error("InvalidProgramState"); } try { - await moiraApi.deleteSubscription(subscription.id); + await moiraApi.delSubscription(subscription.id); this.setState({ settings: { ...settings, diff --git a/src/Containers/TagListContainer.js b/src/Containers/TagListContainer.js index 54065074d..53514b741 100644 --- a/src/Containers/TagListContainer.js +++ b/src/Containers/TagListContainer.js @@ -34,9 +34,11 @@ class TagListContainer extends React.Component { try { const tags = await moiraApi.getTagStats(); const contacts = await moiraApi.getContactList(); - this.setState({ loading: false, tags: tags.list, contacts: contacts.list }); + this.setState({ tags: tags.list, contacts: contacts.list }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -56,7 +58,7 @@ class TagListContainer extends React.Component { await this.props.moiraApi.delSubscription(subscriptionId); this.getData(this.props); } catch (error) { - this.setState({ error: error.message }); + this.setState({ error: error.message, loading: false }); } } diff --git a/src/Containers/TriggerAddContainer.js b/src/Containers/TriggerAddContainer.js index 82ea46a8d..c5485f0b8 100644 --- a/src/Containers/TriggerAddContainer.js +++ b/src/Containers/TriggerAddContainer.js @@ -77,7 +77,6 @@ class TriggerEditContainer extends React.Component { const { list } = await moiraApi.getTagList(); const config = await moiraApi.getConfig(); this.setState({ - loading: false, config: config, tags: list, trigger: { @@ -87,6 +86,8 @@ class TriggerEditContainer extends React.Component { }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } diff --git a/src/Containers/TriggerContainer.js b/src/Containers/TriggerContainer.js index 07a4fb2f2..6675923ec 100644 --- a/src/Containers/TriggerContainer.js +++ b/src/Containers/TriggerContainer.js @@ -13,7 +13,7 @@ import type { Config } from "../Domain/Config"; import type { SortingColum } from "../Components/MetricList/MetricList"; import { withMoiraApi } from "../Api/MoiraApiInjection"; import { getMaintenanceTime } from "../Domain/Maintenance"; -import { getStatusWeight } from "../Domain/Status"; +import { Statuses, getStatusWeight } from "../Domain/Status"; import TriggerInfo from "../Components/TriggerInfo/TriggerInfo"; import MetricList from "../Components/MetricList/MetricList"; import Tabs, { Tab } from "../Components/Tabs/Tabs"; @@ -67,6 +67,7 @@ class TriggerContainer extends React.Component { const { page } = this.parseLocationSearch(location.search); const { id } = match.params; if (typeof id !== "string") { + this.setState({ error: "Wrong trigger id", loading: false }); return; } try { @@ -78,11 +79,9 @@ class TriggerContainer extends React.Component { if (page > Math.ceil(triggerEvents.total / triggerEvents.size) && triggerEvents.total !== 0) { const rightLastPage = Math.ceil(triggerEvents.total / triggerEvents.size) || 1; this.changeLocationSearch({ page: rightLastPage }); - return; } this.setState({ - loading: false, config: config, trigger, triggerState, @@ -90,6 +89,8 @@ class TriggerContainer extends React.Component { }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -99,11 +100,11 @@ class TriggerContainer extends React.Component { this.getData(this.props); } - async setMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { + async setTriggerMaintenance(triggerId: string, maintenance: Maintenance): Promise { this.setState({ loading: true }); const maintenanceTime = getMaintenanceTime(maintenance); await this.props.moiraApi.setMaintenance(triggerId, { - [metric]: + trigger: maintenanceTime > 0 ? moment .utc() @@ -114,12 +115,35 @@ class TriggerContainer extends React.Component { this.getData(this.props); } + async setMetricMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { + this.setState({ loading: true }); + const maintenanceTime = getMaintenanceTime(maintenance); + await this.props.moiraApi.setMaintenance(triggerId, { + metrics: { + [metric]: + maintenanceTime > 0 + ? moment + .utc() + .add(maintenanceTime, "minutes") + .unix() + : maintenanceTime, + }, + }); + this.getData(this.props); + } + async removeMetric(triggerId: string, metric: string): Promise { this.setState({ loading: true }); await this.props.moiraApi.delMetric(triggerId, metric); this.getData(this.props); } + async removeNoDataMetric(triggerId: string): Promise { + this.setState({ loading: true }); + await this.props.moiraApi.delNoDataMetric(triggerId); + this.getData(this.props); + } + parseLocationSearch(search: string): { page: number } { const { page, @@ -241,6 +265,8 @@ class TriggerContainer extends React.Component { const { metrics } = triggerState || {}; const { list: events, total, size } = triggerEvents || {}; const isMetrics = metrics && Object.keys(metrics).length > 0; + const noDataMerticCount = + (metrics && Object.keys(metrics).filter(key => metrics[key].state === Statuses.NODATA).length) || 0; const isEvents = events && events.length > 0; const pageCount = Math.ceil(total / size) || 1; return ( @@ -256,6 +282,9 @@ class TriggerContainer extends React.Component { onThrottlingRemove={triggerId => { this.disableTrhrottling(triggerId); }} + onSetMaintenance={maintenance => { + this.setTriggerMaintenance(trigger.id, maintenance); + }} /> )} @@ -287,11 +316,18 @@ class TriggerContainer extends React.Component { sortingColumn={sortingColumn} sortingDown={sortingDown} onChange={(maintenance, metric) => { - this.setMaintenance(trigger.id, maintenance, metric); + this.setMetricMaintenance(trigger.id, maintenance, metric); }} onRemove={metric => { this.removeMetric(trigger.id, metric); }} + onNoDataRemove={ + noDataMerticCount > 1 + ? () => { + this.removeNoDataMetric(trigger.id); + } + : null + } /> )} diff --git a/src/Containers/TriggerDuplicateContainer.js b/src/Containers/TriggerDuplicateContainer.js new file mode 100644 index 000000000..a74e2565f --- /dev/null +++ b/src/Containers/TriggerDuplicateContainer.js @@ -0,0 +1,151 @@ +// @flow +import * as React from "react"; +import type { ContextRouter } from "react-router-dom"; +import type { IMoiraApi } from "../Api/MoiraAPI"; +import type { Trigger } from "../Domain/Trigger"; +import { getPageLink } from "../Domain/Global"; +import { withMoiraApi } from "../Api/MoiraApiInjection"; +import { ValidationContainer } from "react-ui-validations"; +import Button from "retail-ui/components/Button"; +import RouterLink from "../Components/RouterLink/RouterLink"; +import Layout, { LayoutContent, LayoutTitle } from "../Components/Layout/Layout"; +import TriggerEditForm from "../Components/TriggerEditForm/TriggerEditForm"; +import { ColumnStack, RowStack, Fit } from "../Components/ItemsStack/ItemsStack"; +import type { Config } from "../Domain/Config"; + +type Props = ContextRouter & { moiraApi: IMoiraApi }; +type State = { + loading: boolean, + error: ?string, + trigger: ?Trigger, + tags: ?Array, + config: ?Config, +}; + +class TriggerDuplicateContainer extends React.Component { + props: Props; + state: State = { + loading: true, + error: null, + config: null, + trigger: null, + tags: null, + }; + triggerForm: ?ValidationContainer; + + componentDidMount() { + this.getData(this.props); + } + + componentWillReceiveProps(nextProps: Props) { + this.setState({ loading: true }); + this.getData(nextProps); + } + + cleanTrigger(sourceTrigger: Trigger): Trigger { + const trigger = Object.assign({}, sourceTrigger); + delete trigger.id; + delete trigger.last_check; + delete trigger.throttling; + return { + ...trigger, + name: `${trigger.name} (copy)`, + sched: { ...trigger.sched, tzOffset: new Date().getTimezoneOffset() }, + }; + } + + async getData(props: Props): Promise { + const { moiraApi, match } = props; + const { id } = match.params; + if (typeof id !== "string") { + this.setState({ error: "Wrong trigger id", loading: false }); + return; + } + try { + const sourceTrigger = await moiraApi.getTrigger(id); + const { list } = await moiraApi.getTagList(); + const config = await moiraApi.getConfig(); + const trigger = this.cleanTrigger(sourceTrigger); + this.setState({ trigger: trigger, tags: list, config: config }); + } catch (error) { + this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); + } + } + + async validateForm(): Promise { + if (this.triggerForm == null) { + return true; + } + return await this.triggerForm.validate(); + } + + async handleSubmit(): Promise { + const { trigger } = this.state; + const { history, moiraApi } = this.props; + const isValid = await this.validateForm(); + if (isValid && trigger) { + this.setState({ loading: true }); + try { + const { id } = await moiraApi.addTrigger(trigger); + history.push(getPageLink("trigger", id)); + } catch (error) { + this.setState({ error: error.message, loading: false }); + } + } + } + + handleChange(update: $Shape) { + this.setState((prevState: State) => ({ trigger: { ...prevState.trigger, ...update } })); + } + + render(): React.Node { + const { loading, error, trigger, tags, config } = this.state; + return ( + + + Duplicate trigger + {trigger && ( +
+ + + (this.triggerForm = x)}> + {config != null && ( + this.handleChange(update)} + /> + )} + + + + + + + + + + Cancel + + + + + +
+ )} +
+
+ ); + } +} + +export default withMoiraApi(TriggerDuplicateContainer); diff --git a/src/Containers/TriggerEditContainer.js b/src/Containers/TriggerEditContainer.js index aea00a736..0487fb825 100644 --- a/src/Containers/TriggerEditContainer.js +++ b/src/Containers/TriggerEditContainer.js @@ -46,16 +46,22 @@ class TriggerEditContainer extends React.Component { const { moiraApi, match } = props; const { id } = match.params; if (typeof id !== "string") { - this.setState({ error: "Wrong trigger id" }); + this.setState({ error: "Wrong trigger id", loading: false }); return; } try { const trigger = await moiraApi.getTrigger(id); const { list } = await moiraApi.getTagList(); const config = await moiraApi.getConfig(); - this.setState({ loading: false, trigger: trigger, tags: list, config: config }); + this.setState({ + trigger: trigger, + tags: list, + config: config, + }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -144,7 +150,6 @@ class TriggerEditContainer extends React.Component {
- )} diff --git a/src/Containers/TriggerListContainer.js b/src/Containers/TriggerListContainer.js index bf57eed18..4fad5e45c 100644 --- a/src/Containers/TriggerListContainer.js +++ b/src/Containers/TriggerListContainer.js @@ -13,7 +13,7 @@ import type { TriggerList } from "../Domain/Trigger"; import type { Maintenance } from "../Domain/Maintenance"; import ToggleWithLabel from "../Components/Toggle/Toggle"; import Paging from "../Components/Paging/Paging"; -import Layout, { LayoutPlate, LayoutContent, LayoutPaging } from "../Components/Layout/Layout"; +import Layout, { LayoutPlate, LayoutContent, LayoutFooter } from "../Components/Layout/Layout"; import TagDropdownSelect2 from "../Components/TagDropdownSelect2/TagDropdownSelect2"; import TriggerListView from "../Components/TriggerList/TriggerList"; import AddingButton from "../Components/AddingButton/AddingButton"; @@ -81,7 +81,6 @@ class TriggerListContainer extends React.Component { this.setState({ config: config, - loading: false, error: null, subscriptions: uniq(flattenDeep(subscriptions.map(x => x.tags))), tags: allTags, @@ -89,6 +88,8 @@ class TriggerListContainer extends React.Component { }); } catch (error) { this.setState({ error: error.message }); + } finally { + this.setState({ loading: false }); } } @@ -149,17 +150,19 @@ class TriggerListContainer extends React.Component { ); } - async setMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { + async setMetricMaintenance(triggerId: string, maintenance: Maintenance, metric: string): Promise { this.setState({ loading: true }); const maintenanceTime = getMaintenanceTime(maintenance); await this.props.moiraApi.setMaintenance(triggerId, { - [metric]: - maintenanceTime > 0 - ? moment - .utc() - .add(maintenanceTime, "minutes") - .unix() - : maintenanceTime, + metrics: { + [metric]: + maintenanceTime > 0 + ? moment + .utc() + .add(maintenanceTime, "minutes") + .unix() + : maintenanceTime, + }, }); this.getData(this.props); } @@ -223,7 +226,7 @@ class TriggerListContainer extends React.Component { supportEmail={config.supportEmail} items={triggers.list || []} onChange={(triggerId, maintenance, metric) => { - this.setMaintenance(triggerId, maintenance, metric); + this.setMetricMaintenance(triggerId, maintenance, metric); }} onRemove={(triggerId, metric) => { this.removeMetric(triggerId, metric); @@ -233,13 +236,13 @@ class TriggerListContainer extends React.Component { )} {pageCount > 1 && ( - + this.changeLocationSearch({ page })} /> - + )} ); diff --git a/src/Desktop.AppRoot.js b/src/Desktop.AppRoot.js index 4a0975c5f..3e541f2e9 100644 --- a/src/Desktop.AppRoot.js +++ b/src/Desktop.AppRoot.js @@ -4,6 +4,7 @@ import { Switch, Route } from "react-router-dom"; import TriggerListContainer from "./Containers/TriggerListContainer"; import TriggerContainer from "./Containers/TriggerContainer"; import TriggerEditContainer from "./Containers/TriggerEditContainer"; +import TriggerDuplicateContainer from "./Containers/TriggerDuplicateContainer"; import TriggerAddContainer from "./Containers/TriggerAddContainer"; import SettingsContainer from "./Containers/SettingsContainer"; import NotificationListContainer from "./Containers/NotificationListContainer"; @@ -16,6 +17,7 @@ export default function DesktopApp(): React.Node { + diff --git a/src/Domain/ContactType.js b/src/Domain/ContactType.js index da12f2019..c57b3cc1a 100644 --- a/src/Domain/ContactType.js +++ b/src/Domain/ContactType.js @@ -3,6 +3,8 @@ import type { ContactConfig } from "./Config"; export const ContactTypes = { mail: "mail", + email: "email", + phone: "phone", pushover: "pushover", telegram: "telegram", slack: "slack", @@ -13,6 +15,7 @@ export const ContactTypes = { const ContactTypeCaptions = { mail: "EMail", email: "EMail", + phone: "Phone", pushover: "Pushover", telegram: "Telegram", "twilio sms": "Twilio SMS", diff --git a/src/Domain/Global.js b/src/Domain/Global.js index b5b1cd896..712deb385 100644 --- a/src/Domain/Global.js +++ b/src/Domain/Global.js @@ -3,6 +3,7 @@ export const PagesPaths = { index: "/", trigger: "/trigger/:id", triggerEdit: "/trigger/:id/edit", + triggerDuplicate: "/trigger/:id/duplicate", triggerAdd: "/trigger/new", settings: "/settings", notifications: "/notifications", @@ -14,6 +15,7 @@ export const PagesLinks = { index: "/", trigger: "/trigger/%id%", triggerEdit: "/trigger/%id%/edit", + triggerDuplicate: "/trigger/%id%/duplicate", triggerAdd: "/trigger/new", settings: "/settings", notifications: "/notifications", diff --git a/src/Domain/Maintenance.js b/src/Domain/Maintenance.js index 39cd80dc8..2c78a6aee 100644 --- a/src/Domain/Maintenance.js +++ b/src/Domain/Maintenance.js @@ -7,6 +7,8 @@ export const Maintenances = { sixHours: "sixHours", oneDay: "oneDay", oneWeek: "oneWeek", + twoWeeks: "twoWeeks", + oneMonth: "oneMonth", }; export const MaintenanceTimes = { @@ -17,6 +19,8 @@ export const MaintenanceTimes = { sixHours: 360, oneDay: 1440, oneWeek: 10080, + twoWeeks: 20160, + oneMonth: 43200, }; export const MaintenanceCaptions = { @@ -27,6 +31,8 @@ export const MaintenanceCaptions = { sixHours: "6 hours", oneDay: "1 day", oneWeek: "1 week", + twoWeeks: "2 weeks", + oneMonth: "1 month", }; export type Maintenance = $Keys; diff --git a/src/Domain/MoiraServiceStates.js b/src/Domain/MoiraServiceStates.js new file mode 100644 index 000000000..8248ce925 --- /dev/null +++ b/src/Domain/MoiraServiceStates.js @@ -0,0 +1,10 @@ +// @flow +export const MoiraServiceStates = { + OK: "OK", + ERROR: "ERROR", +}; + +export type NotifierState = {| + state: $Keys, + message?: string, +|}; diff --git a/src/Domain/MoiraStatus.js b/src/Domain/MoiraStatus.js deleted file mode 100644 index 8a495963b..000000000 --- a/src/Domain/MoiraStatus.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow -export const MoiraStates = { - OK: "OK", - ERROR: "ERROR", -}; - -export type MoiraStatus = {| - state: $Keys, - message?: string, -|}; diff --git a/src/Domain/Status.js b/src/Domain/Status.js index c88554681..3b50c32e9 100644 --- a/src/Domain/Status.js +++ b/src/Domain/Status.js @@ -1,42 +1,52 @@ // @flow + export const Statuses = { + DEL: "DEL", + EXCEPTION: "EXCEPTION", NODATA: "NODATA", - WARN: "WARN", ERROR: "ERROR", - EXCEPTION: "EXCEPTION", - DEL: "DEL", + WARN: "WARN", OK: "OK", }; export const StatusesCaptions = { + DEL: "DEL", + EXCEPTION: "EXCEPTION", NODATA: "NODATA", - WARN: "WARN", ERROR: "ERROR", - EXCEPTION: "EXCEPTION", - DEL: "DEL", + WARN: "WARN", OK: "OK", }; export const StatusesColors = { + DEL: "#000", + EXCEPTION: "#ff5722", NODATA: "#9e9e9e", - WARN: "#ffc107", ERROR: "#ff5722", - EXCEPTION: "#ff5722", - DEL: "#000", + WARN: "#ffc107", OK: "#00bfa5", }; export const StatusesWeight = { + DEL: 100000, + EXCEPTION: 100000, NODATA: 1000, - WARN: 1, ERROR: 100, - EXCEPTION: 100000, - DEL: 100000, + WARN: 1, OK: 0, }; export type Status = $Keys; +export const StatusesInOrder: Status[] = [ + Statuses.EXCEPTION, + Statuses.NODATA, + Statuses.ERROR, + Statuses.WARN, + Statuses.OK, + Statuses.DEL, +]; + export function getStatusColor(status: Status): string { return StatusesColors[status]; } diff --git a/src/Domain/Subscription.js b/src/Domain/Subscription.js index d5f8b9df7..f75b2abf2 100644 --- a/src/Domain/Subscription.js +++ b/src/Domain/Subscription.js @@ -12,4 +12,8 @@ export type Subscription = { id: string, ignore_recoverings: boolean, ignore_warnings: boolean, + plotting?: { + enabled: boolean, + theme: "light" | "dark", + }, }; diff --git a/src/Domain/Trigger.js b/src/Domain/Trigger.js index 203a1fc0d..f2433bf78 100644 --- a/src/Domain/Trigger.js +++ b/src/Domain/Trigger.js @@ -29,6 +29,7 @@ export type Trigger = { |}, timestamp?: number, is_remote: boolean, + mute_new_metrics: boolean, }; export type TriggerList = {| diff --git a/src/Helpers/ContactValidator.js b/src/Helpers/ContactValidator.js index bd4e6d453..ee76feaa2 100644 --- a/src/Helpers/ContactValidator.js +++ b/src/Helpers/ContactValidator.js @@ -1,37 +1,38 @@ // @flow import * as React from "react"; +import { ContactTypes } from "../Domain/ContactType"; import { type ContactConfig } from "../Domain/Config"; import type { ValidationInfo } from "react-ui-validations"; export default function validateContact(contactConfig: ContactConfig, value: string): ?ValidationInfo { const contactType = contactConfig.type; switch (contactType) { - case "email": { + case ContactTypes.email: { if (value == null || value.trim() === "" || !value.includes("@")) { return { message: "Please enter a valid email address", type: "submit" }; } break; } - case "pushover": { + case ContactTypes.pushover: { if (value == null || value.trim() === "" || value.trim().includes(" ")) { return { message: "Please enter a valid pushover user key", type: "submit" }; } break; } - case "telegram": { + case ContactTypes.telegram: { if (value == null || value.trim() === "") { return { message: "Enter a valid telegram #channel, @username or group", type: "submit" }; } break; } - case "slack": { + case ContactTypes.slack: { if (value == null || value.trim() === "") { return { message: "Enter a valid telegram #channel, @username or group", type: "submit" }; } break; } - case "twilio sms": - case "twilio voice": { + case ContactTypes["twilio sms"]: + case ContactTypes["twilio voice"]: { if (value == null || value.trim() === "") { return { message: "Enter your phone number", type: "submit" }; } diff --git a/src/Stories/ContactEditForm.stories.js b/src/Stories/ContactEditForm.stories.js index 254593535..61d5f0ad2 100644 --- a/src/Stories/ContactEditForm.stories.js +++ b/src/Stories/ContactEditForm.stories.js @@ -4,6 +4,7 @@ import { storiesOf } from "@storybook/react"; import { action } from "@storybook/addon-actions"; import { ValidationContainer } from "react-ui-validations"; import ContactEditForm from "../Components/ContactEditForm/ContactEditForm"; +import { ContactTypes } from "../Domain/ContactType"; import { contactConfigs } from "./Data/ContactConfigs"; const commonProps = { @@ -26,7 +27,7 @@ storiesOf("ContactEditForm", module) @@ -35,7 +36,7 @@ storiesOf("ContactEditForm", module) diff --git a/src/Stories/Data/ContactConfigs.js b/src/Stories/Data/ContactConfigs.js index 49dc825dc..c9b517203 100644 --- a/src/Stories/Data/ContactConfigs.js +++ b/src/Stories/Data/ContactConfigs.js @@ -1,36 +1,37 @@ // @flow +import { ContactTypes } from "../../Domain/ContactType"; import type { ContactConfig } from "../../Domain/Config"; export const contactConfigs: Array = [ { - type: "email", + type: ContactTypes.email, validation: "^.+@.+..+$", }, { - type: "phone", + type: ContactTypes.phone, validation: "^9d{9}$", title: "kontur sms", help: "Phone number format 9*********", }, { - type: "pushover", + type: ContactTypes.pushover, validation: "", title: "Pushover user key", }, { - type: "slack", + type: ContactTypes.slack, validation: "^[@#][a-zA-Z0-9-_]+", title: "slack #channel / @user", }, { - type: "telegram", + type: ContactTypes.telegram, validation: "", title: "#channel, @username, group", help: "Required to grant [@KonturMoiraBot](https://t.me/KonturMoiraBot) admin privileges for channels,\nor `/start` command in groups and personal chats", }, { - type: "twilio voice", + type: ContactTypes["twilio voice"], validation: "^+79d{9}$", title: "twilio voice", help: "Phone number format +79*********", diff --git a/src/Stories/Data/Triggers.js b/src/Stories/Data/Triggers.js index 7e6b9cd4d..faf0ef685 100644 --- a/src/Stories/Data/Triggers.js +++ b/src/Stories/Data/Triggers.js @@ -22,6 +22,7 @@ const data = [ tags: ["normal", "EDI", "DevOps", "dbaas", "Cassandra"], throttling: 0, ttl_state: "NODATA", + notify_about_new_metrics: false, id: "f1b45470-b0eb-498b-a22d-2c3ced467a91", patterns: ["EDITest.Cassandra.*.*.DownEndpointCount.DownEndpointCount"], trigger_type: "falling", @@ -76,6 +77,7 @@ const data = [ }, name: "BillyElastic GC Time", ttl_state: "NODATA", + notify_about_new_metrics: true, throttling: 1, tags: ["Billy"], id: "875ec87c-969b-4bc0-93ca-4db0efbe4ce6", @@ -130,6 +132,7 @@ const data = [ }, name: "Highlander-WebAPI 400 Count", ttl_state: "NODATA", + notify_about_new_metrics: false, throttling: 0, tags: ["Highlander-WebApi", "KE"], id: "234225c0-7e6d-4aa5-9681-39ee17ffec0c", @@ -232,6 +235,7 @@ const data = [ }, name: "BillyElastic Query Time", ttl_state: "NODATA", + notify_about_new_metrics: true, throttling: 0, tags: ["Billy"], id: "03f11d7c-2260-455a-b296-6db6e094b1f0", @@ -290,6 +294,7 @@ const data = [ tags: ["EgaisTest"], throttling: 0, ttl_state: "NODATA", + notify_about_new_metrics: false, targets: ["ADK.elasticsearch.rosalco{26,27,28}.rosalco.jvm.mem.heap_used_percent"], patterns: ["ADK.elasticsearch.rosalco{26,27,28}.rosalco.jvm.mem.heap_used_percent"], trigger_type: "falling", @@ -344,6 +349,7 @@ const data = [ tags: ["SDI"], throttling: 0, ttl_state: "NODATA", + notify_about_new_metrics: true, targets: [ "aliasByNode(scale(exclude(sortByMaxima(currentBelow(KE.Databases.BackupAge.*.*.Diff.Minutes, 1000000000)), '(_tmp|_temp|_bak|_copy|_test|aspstate)'), 0.0166666666666667), 3, 4)", ], @@ -2650,6 +2656,7 @@ const data = [ tags: ["edi_orvis_api"], throttling: 0, ttl_state: "NODATA", + notify_about_new_metrics: false, targets: [ "EDI_Orvis.system.icat25.networkadapter.intelri350gigabitnetworkconnection.bytestotal-sec", "EDI_Orvis.system.icat25.networkadapter.intelri350gigabitnetworkconnection2.bytestotal-sec", @@ -2702,6 +2709,7 @@ const data = [ }, name: "kladr p95", ttl_state: "NODATA", + notify_about_new_metrics: false, throttling: 0, tags: ["KLADR"], id: "d22d1517-8932-4158-b7e1-8b20f0dae6b2", @@ -2752,6 +2760,7 @@ const data = [ tags: ["Cassandra", "DevOps", "dbaas", "normal"], throttling: 0, ttl_state: "NODATA", + notify_about_new_metrics: false, targets: ["aliasByNode({Alko,EDI,EDITest,KE,KE-cloud,KE-dev}.Cassandra.*.*.GC.StopTheWorld.sum, 0, 2, 3)"], patterns: ["{Alko,EDI,EDITest,KE,KE-cloud,KE-dev}.Cassandra.*.*.GC.StopTheWorld.sum"], trigger_type: "expression", @@ -3256,6 +3265,7 @@ const data = [ }, name: "Ceph free node space", ttl_state: "NODATA", + notify_about_new_metrics: false, throttling: 0, tags: ["Ceph", "SPS"], id: "28b75586-8a4c-499b-8f5d-0811e6584ab0", diff --git a/src/Stories/Layout.stories.js b/src/Stories/Layout.stories.js index 83c8a06c6..be2f224cc 100644 --- a/src/Stories/Layout.stories.js +++ b/src/Stories/Layout.stories.js @@ -55,9 +55,9 @@ storiesOf("Layout", module) - + - + )) .add("With Plate and paging", () => ( @@ -68,8 +68,8 @@ storiesOf("Layout", module) - + - + )); diff --git a/src/Stories/MetricList.stories.js b/src/Stories/MetricList.stories.js index 36cc935ab..f281ef65d 100644 --- a/src/Stories/MetricList.stories.js +++ b/src/Stories/MetricList.stories.js @@ -41,4 +41,13 @@ storiesOf("MetricList", module) .add("Default", () => ) .add("With Status Indicator", () => ( + )) + .add("With Remove all NODATA", () => ( + )); diff --git a/src/Stories/StatusIndicator.stories.js b/src/Stories/StatusIndicator.stories.js index e2728a53e..88eb4f9d8 100644 --- a/src/Stories/StatusIndicator.stories.js +++ b/src/Stories/StatusIndicator.stories.js @@ -24,7 +24,7 @@ storiesOf("StatusIndicator", module) .add("DEL", () => ) .add("NODATA & WARN", () => ) .add("NODATA & ERROR", () => ) - .add("WARN & ERROR", () => ) - .add("NODATA & WARN & ERROR", () => ( - + .add("ERROR & WARN", () => ) + .add("NODATA & ERROR & WARN", () => ( + )); diff --git a/src/Stories/SubscriptionEditor.stories.js b/src/Stories/SubscriptionEditor.stories.js index 5b5bb74a3..cecbc8bab 100644 --- a/src/Stories/SubscriptionEditor.stories.js +++ b/src/Stories/SubscriptionEditor.stories.js @@ -58,4 +58,91 @@ storiesOf("SubscriptionEditor", module) ignore_warnings: false, }} /> + )) + .add("Without graph", () => ( + + )) + .add("With graph in dark theme", () => ( + + )) + .add("With graph in light theme", () => ( + )); diff --git a/src/Stories/TriggerEditForm.stories.js b/src/Stories/TriggerEditForm.stories.js index 106374843..de5bc5cec 100644 --- a/src/Stories/TriggerEditForm.stories.js +++ b/src/Stories/TriggerEditForm.stories.js @@ -36,6 +36,7 @@ const sourceData = { trigger_type: "falling", throttling: 0, expression: "", + notify_about_new_metrics: false, }; const allTags = ["devops", "critical", "error", "warning", "del", "moira"]; @@ -123,6 +124,7 @@ const stories = [ "aliasByNode(DevOps.system.*ditrace*.process.*.uptime, 6, 8)", ], ttl_state: Statuses.OK, + notify_about_new_metrics: true, }, }, ]; diff --git a/src/Stories/TriggerInfo.stories.js b/src/Stories/TriggerInfo.stories.js index 2ce09d524..6aa98fbf5 100644 --- a/src/Stories/TriggerInfo.stories.js +++ b/src/Stories/TriggerInfo.stories.js @@ -6,6 +6,7 @@ import StoryRouter from "storybook-router"; import TriggerInfo from "../Components/TriggerInfo/TriggerInfo"; const sourceData = { + notify_about_new_metrics: false, is_remote: false, error_value: 1000.0, sched: { diff --git a/src/Stories/TriggerListItem.stories.js b/src/Stories/TriggerListItem.stories.js index ca734c602..566df84e9 100644 --- a/src/Stories/TriggerListItem.stories.js +++ b/src/Stories/TriggerListItem.stories.js @@ -6,6 +6,7 @@ import StoryRouter from "storybook-router"; import TriggerListItem from "../Components/TriggerListItem/TriggerListItem"; const sourceData = { + notify_about_new_metrics: false, is_remote: false, id: "3e93211b-7fec-4c70-b5e1-abb36d6a4a1d", trigger_type: "falling", diff --git a/src/helpers.js b/src/helpers.js index a34c3ebe1..771dfcc33 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -25,7 +25,3 @@ export function roundValue(value: number | string | void, placeholder: boolean | } return prefix.substring(0, prefix.length - tailToCut) + (sizes[x] || ""); } - -export function getJSONContent(data: { [key: string]: any }): string { - return "data:text/plain;charset=utf-8," + encodeURIComponent(JSON.stringify(data, null, 2)); -}