├── .DS_Store ├── Dockerfile ├── LICENSE ├── README.md ├── dashboard.json ├── go.mod ├── go.sum ├── main.go └── models ├── prom.go └── tsp.go /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grf1/tsduck-prometheus/1d8e5998b1225c086b5697ed580206500010be65/.DS_Store -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.18-alpine 2 | 3 | WORKDIR /app 4 | 5 | # Add Build Dependencies & Compile TSDuck 6 | RUN apk update && \ 7 | apk add git && \ 8 | apk add build-base && \ 9 | apk add bash && \ 10 | apk add sudo && \ 11 | git clone https://github.com/tsduck/tsduck && \ 12 | cd tsduck && \ 13 | ./scripts/install-prerequisites.sh && \ 14 | make -j10 && \ 15 | make install && \ 16 | make distclean && \ 17 | rm -r ../tsduck && \ 18 | apk del git && \ 19 | apk del build-base && \ 20 | apk del bash && \ 21 | apk del sudo && \ 22 | rm -rf /var/cache/apk/* 23 | 24 | COPY go.mod ./ 25 | COPY *.go ./ 26 | COPY models ./models 27 | RUN go mod tidy 28 | 29 | RUN go build -o /tsduck-prometheus 30 | 31 | CMD ["/tsduck-prometheus"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 George French 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TSDuck Prometheus 2 | 3 | TSDuck Prometheus is a tool to export values from a TSDuck analyser pipeline into Prometheus, to enable you to build realtime Grafana dashboards for monitoring of MPEG-TS transport streams 4 | 5 | The metrics exported try to cover most of ETR290 Priority 1 6 | 7 | ## Using this tool 8 | 9 | ### Compiling 10 | 11 | Make sure you have TSDuck and Go version >1.18 installed, and can run 'tsp' commands on your machine. Clone this repo and build using the following commands... 12 | 13 | ``` 14 | go mod tidy 15 | go build -o /tsduck-prometheus 16 | ./tsduck-prometheus 225.0.0.1:20000,172.0.0.1,My_Service 17 | ``` 18 | 19 | ### Docker 20 | 21 | A Dockerfile is included on this repository, it's not perfect at the moment (the image size could likely be smaller) but it works 22 | 23 | Local to the Dockerfile, the following commands can be used to get started using Docker with host networking mode 24 | 25 | ``` 26 | docker build -t tsduck-prometheus . 27 | docker run -d --network host tsduck-prometheus 225.0.0.1:20000,172.0.0.1,My_Service 28 | ``` 29 | 30 | ## Example Grafana Dashboard 31 | 32 | An example dashboard is included on the repository to get you started (see [dashboard.json](dashboard.json)) 33 | 34 | ![screencapture-upvideodev-3000-d-KgOonCL4k-tsduck-prometheus-2023-04-12-15_36_31](https://user-images.githubusercontent.com/4109420/231584536-ada1fb35-83ea-4e6a-89b6-6b2b2b67d2e0.png) 35 | 36 | -------------------------------------------------------------------------------- /dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "target": { 15 | "limit": 100, 16 | "matchAny": false, 17 | "tags": [], 18 | "type": "dashboard" 19 | }, 20 | "type": "dashboard" 21 | } 22 | ] 23 | }, 24 | "editable": true, 25 | "fiscalYearStartMonth": 0, 26 | "graphTooltip": 0, 27 | "id": 3, 28 | "links": [], 29 | "liveNow": false, 30 | "panels": [ 31 | { 32 | "datasource": { 33 | "type": "prometheus", 34 | "uid": "KED0l8LVz" 35 | }, 36 | "fieldConfig": { 37 | "defaults": { 38 | "color": { 39 | "fixedColor": "blue", 40 | "mode": "fixed" 41 | }, 42 | "custom": { 43 | "axisCenteredZero": false, 44 | "axisColorMode": "text", 45 | "axisGridShow": false, 46 | "axisLabel": "", 47 | "axisPlacement": "left", 48 | "barAlignment": 0, 49 | "drawStyle": "line", 50 | "fillOpacity": 10, 51 | "gradientMode": "none", 52 | "hideFrom": { 53 | "legend": false, 54 | "tooltip": false, 55 | "viz": false 56 | }, 57 | "lineInterpolation": "smooth", 58 | "lineStyle": { 59 | "fill": "solid" 60 | }, 61 | "lineWidth": 2, 62 | "pointSize": 2, 63 | "scaleDistribution": { 64 | "type": "linear" 65 | }, 66 | "showPoints": "auto", 67 | "spanNulls": false, 68 | "stacking": { 69 | "group": "A", 70 | "mode": "none" 71 | }, 72 | "thresholdsStyle": { 73 | "mode": "off" 74 | } 75 | }, 76 | "mappings": [], 77 | "thresholds": { 78 | "mode": "absolute", 79 | "steps": [ 80 | { 81 | "color": "green", 82 | "value": null 83 | }, 84 | { 85 | "color": "red", 86 | "value": 80 87 | } 88 | ] 89 | }, 90 | "unit": "bps" 91 | }, 92 | "overrides": [] 93 | }, 94 | "gridPos": { 95 | "h": 7, 96 | "w": 12, 97 | "x": 0, 98 | "y": 0 99 | }, 100 | "id": 19, 101 | "options": { 102 | "legend": { 103 | "calcs": [], 104 | "displayMode": "list", 105 | "placement": "bottom", 106 | "showLegend": false 107 | }, 108 | "tooltip": { 109 | "mode": "none", 110 | "sort": "none" 111 | } 112 | }, 113 | "targets": [ 114 | { 115 | "datasource": { 116 | "type": "prometheus", 117 | "uid": "KED0l8LVz" 118 | }, 119 | "editorMode": "builder", 120 | "expr": "ts_bitrate_bytes", 121 | "legendFormat": "__auto", 122 | "range": true, 123 | "refId": "A" 124 | } 125 | ], 126 | "title": "TS Bitrate", 127 | "type": "timeseries" 128 | }, 129 | { 130 | "datasource": { 131 | "type": "prometheus", 132 | "uid": "KED0l8LVz" 133 | }, 134 | "fieldConfig": { 135 | "defaults": { 136 | "color": { 137 | "fixedColor": "#5794F2", 138 | "mode": "fixed" 139 | }, 140 | "custom": { 141 | "hideFrom": { 142 | "legend": false, 143 | "tooltip": false, 144 | "viz": false 145 | } 146 | }, 147 | "mappings": [], 148 | "unit": "Bps" 149 | }, 150 | "overrides": [] 151 | }, 152 | "gridPos": { 153 | "h": 7, 154 | "w": 6, 155 | "x": 12, 156 | "y": 0 157 | }, 158 | "id": 6, 159 | "options": { 160 | "displayLabels": [], 161 | "legend": { 162 | "displayMode": "list", 163 | "placement": "bottom", 164 | "showLegend": false 165 | }, 166 | "pieType": "pie", 167 | "reduceOptions": { 168 | "calcs": [ 169 | "lastNotNull" 170 | ], 171 | "fields": "", 172 | "values": false 173 | }, 174 | "tooltip": { 175 | "mode": "single", 176 | "sort": "none" 177 | } 178 | }, 179 | "targets": [ 180 | { 181 | "datasource": { 182 | "type": "prometheus", 183 | "uid": "KED0l8LVz" 184 | }, 185 | "editorMode": "code", 186 | "expr": "ts_pid_bitrate_bytes{}", 187 | "legendFormat": "PID {{pid_hexadecimal}} ({{description}})", 188 | "range": true, 189 | "refId": "A" 190 | } 191 | ], 192 | "title": "TS PID Structure", 193 | "type": "piechart" 194 | }, 195 | { 196 | "datasource": { 197 | "type": "prometheus", 198 | "uid": "KED0l8LVz" 199 | }, 200 | "fieldConfig": { 201 | "defaults": { 202 | "color": { 203 | "mode": "thresholds" 204 | }, 205 | "custom": { 206 | "align": "auto", 207 | "cellOptions": { 208 | "type": "auto" 209 | }, 210 | "inspect": false 211 | }, 212 | "mappings": [], 213 | "thresholds": { 214 | "mode": "absolute", 215 | "steps": [ 216 | { 217 | "color": "green", 218 | "value": null 219 | }, 220 | { 221 | "color": "#EAB839", 222 | "value": 5 223 | }, 224 | { 225 | "color": "red", 226 | "value": 10 227 | } 228 | ] 229 | } 230 | }, 231 | "overrides": [] 232 | }, 233 | "gridPos": { 234 | "h": 7, 235 | "w": 6, 236 | "x": 18, 237 | "y": 0 238 | }, 239 | "id": 4, 240 | "maxDataPoints": 1, 241 | "options": { 242 | "footer": { 243 | "countRows": false, 244 | "fields": "", 245 | "reducer": [ 246 | "sum" 247 | ], 248 | "show": false 249 | }, 250 | "showHeader": true 251 | }, 252 | "pluginVersion": "9.4.7", 253 | "targets": [ 254 | { 255 | "datasource": { 256 | "type": "prometheus", 257 | "uid": "KED0l8LVz" 258 | }, 259 | "editorMode": "code", 260 | "expr": "ts_pid_bitrate_bytes{}", 261 | "format": "table", 262 | "legendFormat": "__auto", 263 | "range": true, 264 | "refId": "A" 265 | } 266 | ], 267 | "title": "TS PID Structure", 268 | "transformations": [ 269 | { 270 | "id": "filterFieldsByName", 271 | "options": { 272 | "include": { 273 | "names": [ 274 | "description", 275 | "pid_hexadecimal" 276 | ] 277 | } 278 | } 279 | } 280 | ], 281 | "type": "table" 282 | }, 283 | { 284 | "datasource": { 285 | "type": "prometheus", 286 | "uid": "KED0l8LVz" 287 | }, 288 | "fieldConfig": { 289 | "defaults": { 290 | "color": { 291 | "mode": "thresholds" 292 | }, 293 | "mappings": [], 294 | "noValue": "0", 295 | "thresholds": { 296 | "mode": "absolute", 297 | "steps": [ 298 | { 299 | "color": "green", 300 | "value": null 301 | }, 302 | { 303 | "color": "red", 304 | "value": 1 305 | } 306 | ] 307 | } 308 | }, 309 | "overrides": [] 310 | }, 311 | "gridPos": { 312 | "h": 3, 313 | "w": 4, 314 | "x": 0, 315 | "y": 7 316 | }, 317 | "id": 20, 318 | "options": { 319 | "colorMode": "value", 320 | "graphMode": "none", 321 | "justifyMode": "auto", 322 | "orientation": "auto", 323 | "reduceOptions": { 324 | "calcs": [ 325 | "lastNotNull" 326 | ], 327 | "fields": "", 328 | "values": false 329 | }, 330 | "textMode": "auto" 331 | }, 332 | "pluginVersion": "9.4.7", 333 | "targets": [ 334 | { 335 | "datasource": { 336 | "type": "prometheus", 337 | "uid": "KED0l8LVz" 338 | }, 339 | "editorMode": "code", 340 | "expr": "sum(ts_packet_invalid_sync_total{})", 341 | "legendFormat": "PID {{pid_hexadecimal}}, {{description}}", 342 | "range": true, 343 | "refId": "A" 344 | } 345 | ], 346 | "title": "Invalid TS Sync Packets", 347 | "type": "stat" 348 | }, 349 | { 350 | "datasource": { 351 | "type": "prometheus", 352 | "uid": "KED0l8LVz" 353 | }, 354 | "fieldConfig": { 355 | "defaults": { 356 | "color": { 357 | "mode": "thresholds" 358 | }, 359 | "mappings": [], 360 | "noValue": "0", 361 | "thresholds": { 362 | "mode": "absolute", 363 | "steps": [ 364 | { 365 | "color": "green", 366 | "value": null 367 | }, 368 | { 369 | "color": "red", 370 | "value": 1 371 | } 372 | ] 373 | } 374 | }, 375 | "overrides": [] 376 | }, 377 | "gridPos": { 378 | "h": 3, 379 | "w": 4, 380 | "x": 4, 381 | "y": 7 382 | }, 383 | "id": 7, 384 | "options": { 385 | "colorMode": "value", 386 | "graphMode": "none", 387 | "justifyMode": "auto", 388 | "orientation": "auto", 389 | "reduceOptions": { 390 | "calcs": [ 391 | "lastNotNull" 392 | ], 393 | "fields": "", 394 | "values": false 395 | }, 396 | "textMode": "auto" 397 | }, 398 | "pluginVersion": "9.4.7", 399 | "targets": [ 400 | { 401 | "datasource": { 402 | "type": "prometheus", 403 | "uid": "KED0l8LVz" 404 | }, 405 | "editorMode": "code", 406 | "expr": "sum(ts_pid_duplicated_total{})", 407 | "legendFormat": "PID {{pid_hexadecimal}}, {{description}}", 408 | "range": true, 409 | "refId": "A" 410 | } 411 | ], 412 | "title": "Total Duplicated Packets", 413 | "type": "stat" 414 | }, 415 | { 416 | "datasource": { 417 | "type": "prometheus", 418 | "uid": "KED0l8LVz" 419 | }, 420 | "fieldConfig": { 421 | "defaults": { 422 | "color": { 423 | "mode": "thresholds" 424 | }, 425 | "mappings": [], 426 | "noValue": "0", 427 | "thresholds": { 428 | "mode": "absolute", 429 | "steps": [ 430 | { 431 | "color": "green", 432 | "value": null 433 | }, 434 | { 435 | "color": "red", 436 | "value": 1 437 | } 438 | ] 439 | } 440 | }, 441 | "overrides": [] 442 | }, 443 | "gridPos": { 444 | "h": 3, 445 | "w": 4, 446 | "x": 8, 447 | "y": 7 448 | }, 449 | "id": 22, 450 | "options": { 451 | "colorMode": "value", 452 | "graphMode": "none", 453 | "justifyMode": "auto", 454 | "orientation": "auto", 455 | "reduceOptions": { 456 | "calcs": [ 457 | "lastNotNull" 458 | ], 459 | "fields": "", 460 | "values": false 461 | }, 462 | "text": {}, 463 | "textMode": "auto" 464 | }, 465 | "pluginVersion": "9.4.7", 466 | "targets": [ 467 | { 468 | "datasource": { 469 | "type": "prometheus", 470 | "uid": "KED0l8LVz" 471 | }, 472 | "editorMode": "code", 473 | "expr": "sum(ts_packet_tei_count_total{})", 474 | "legendFormat": "__auto", 475 | "range": true, 476 | "refId": "A" 477 | } 478 | ], 479 | "title": "Transport Errors", 480 | "type": "stat" 481 | }, 482 | { 483 | "datasource": { 484 | "type": "prometheus", 485 | "uid": "KED0l8LVz" 486 | }, 487 | "fieldConfig": { 488 | "defaults": { 489 | "color": { 490 | "fixedColor": "blue", 491 | "mode": "fixed" 492 | }, 493 | "mappings": [], 494 | "noValue": "0", 495 | "thresholds": { 496 | "mode": "absolute", 497 | "steps": [ 498 | { 499 | "color": "green", 500 | "value": null 501 | }, 502 | { 503 | "color": "red", 504 | "value": 1 505 | } 506 | ] 507 | } 508 | }, 509 | "overrides": [] 510 | }, 511 | "gridPos": { 512 | "h": 3, 513 | "w": 6, 514 | "x": 12, 515 | "y": 7 516 | }, 517 | "id": 21, 518 | "options": { 519 | "colorMode": "value", 520 | "graphMode": "none", 521 | "justifyMode": "auto", 522 | "orientation": "auto", 523 | "reduceOptions": { 524 | "calcs": [ 525 | "lastNotNull" 526 | ], 527 | "fields": "", 528 | "values": false 529 | }, 530 | "textMode": "value" 531 | }, 532 | "pluginVersion": "9.4.7", 533 | "targets": [ 534 | { 535 | "datasource": { 536 | "type": "prometheus", 537 | "uid": "KED0l8LVz" 538 | }, 539 | "editorMode": "code", 540 | "expr": "ts_", 541 | "legendFormat": "__auto", 542 | "range": true, 543 | "refId": "A" 544 | } 545 | ], 546 | "title": "PCR PID Count", 547 | "type": "stat" 548 | }, 549 | { 550 | "datasource": { 551 | "type": "prometheus", 552 | "uid": "KED0l8LVz" 553 | }, 554 | "fieldConfig": { 555 | "defaults": { 556 | "color": { 557 | "fixedColor": "blue", 558 | "mode": "fixed" 559 | }, 560 | "mappings": [], 561 | "noValue": "0", 562 | "thresholds": { 563 | "mode": "absolute", 564 | "steps": [ 565 | { 566 | "color": "green", 567 | "value": null 568 | }, 569 | { 570 | "color": "red", 571 | "value": 1 572 | } 573 | ] 574 | } 575 | }, 576 | "overrides": [] 577 | }, 578 | "gridPos": { 579 | "h": 3, 580 | "w": 6, 581 | "x": 18, 582 | "y": 7 583 | }, 584 | "id": 23, 585 | "options": { 586 | "colorMode": "value", 587 | "graphMode": "none", 588 | "justifyMode": "auto", 589 | "orientation": "auto", 590 | "reduceOptions": { 591 | "calcs": [ 592 | "lastNotNull" 593 | ], 594 | "fields": "", 595 | "values": false 596 | }, 597 | "textMode": "value" 598 | }, 599 | "pluginVersion": "9.4.7", 600 | "targets": [ 601 | { 602 | "datasource": { 603 | "type": "prometheus", 604 | "uid": "KED0l8LVz" 605 | }, 606 | "editorMode": "code", 607 | "expr": "ts_pid_unreferenced_count_total{}", 608 | "legendFormat": "__auto", 609 | "range": true, 610 | "refId": "A" 611 | } 612 | ], 613 | "title": "Unreferenced PID Count", 614 | "type": "stat" 615 | }, 616 | { 617 | "datasource": { 618 | "type": "prometheus", 619 | "uid": "KED0l8LVz" 620 | }, 621 | "description": "", 622 | "fieldConfig": { 623 | "defaults": { 624 | "color": { 625 | "mode": "thresholds" 626 | }, 627 | "custom": { 628 | "fillOpacity": 40, 629 | "lineWidth": 1 630 | }, 631 | "decimals": 0, 632 | "mappings": [], 633 | "noValue": "0", 634 | "thresholds": { 635 | "mode": "absolute", 636 | "steps": [ 637 | { 638 | "color": "green", 639 | "value": null 640 | }, 641 | { 642 | "color": "red", 643 | "value": 1 644 | } 645 | ] 646 | }, 647 | "unit": "none" 648 | }, 649 | "overrides": [] 650 | }, 651 | "gridPos": { 652 | "h": 7, 653 | "w": 24, 654 | "x": 0, 655 | "y": 10 656 | }, 657 | "id": 17, 658 | "maxDataPoints": 64, 659 | "options": { 660 | "colWidth": 0.9, 661 | "legend": { 662 | "displayMode": "list", 663 | "placement": "bottom", 664 | "showLegend": true 665 | }, 666 | "rowHeight": 0.9, 667 | "showValue": "never", 668 | "tooltip": { 669 | "mode": "single", 670 | "sort": "none" 671 | } 672 | }, 673 | "pluginVersion": "9.4.7", 674 | "targets": [ 675 | { 676 | "datasource": { 677 | "type": "prometheus", 678 | "uid": "KED0l8LVz" 679 | }, 680 | "editorMode": "code", 681 | "exemplar": false, 682 | "expr": "increase(ts_pid_discontinuities_total[$__interval])", 683 | "format": "heatmap", 684 | "instant": false, 685 | "legendFormat": "{{description}}", 686 | "range": true, 687 | "refId": "A" 688 | } 689 | ], 690 | "title": "PID Continuity Errors", 691 | "type": "status-history" 692 | }, 693 | { 694 | "datasource": { 695 | "type": "prometheus", 696 | "uid": "KED0l8LVz" 697 | }, 698 | "fieldConfig": { 699 | "defaults": { 700 | "color": { 701 | "mode": "palette-classic" 702 | }, 703 | "custom": { 704 | "axisCenteredZero": false, 705 | "axisColorMode": "text", 706 | "axisLabel": "", 707 | "axisPlacement": "auto", 708 | "barAlignment": 0, 709 | "drawStyle": "line", 710 | "fillOpacity": 0, 711 | "gradientMode": "none", 712 | "hideFrom": { 713 | "legend": false, 714 | "tooltip": false, 715 | "viz": false 716 | }, 717 | "lineInterpolation": "smooth", 718 | "lineWidth": 2, 719 | "pointSize": 1, 720 | "scaleDistribution": { 721 | "type": "linear" 722 | }, 723 | "showPoints": "auto", 724 | "spanNulls": false, 725 | "stacking": { 726 | "group": "A", 727 | "mode": "none" 728 | }, 729 | "thresholdsStyle": { 730 | "mode": "off" 731 | } 732 | }, 733 | "mappings": [], 734 | "thresholds": { 735 | "mode": "absolute", 736 | "steps": [ 737 | { 738 | "color": "green", 739 | "value": null 740 | }, 741 | { 742 | "color": "red", 743 | "value": 80 744 | } 745 | ] 746 | }, 747 | "unit": "dtdurationms" 748 | }, 749 | "overrides": [] 750 | }, 751 | "gridPos": { 752 | "h": 8, 753 | "w": 12, 754 | "x": 0, 755 | "y": 17 756 | }, 757 | "id": 9, 758 | "options": { 759 | "legend": { 760 | "calcs": [], 761 | "displayMode": "list", 762 | "placement": "bottom", 763 | "showLegend": true 764 | }, 765 | "tooltip": { 766 | "mode": "single", 767 | "sort": "none" 768 | } 769 | }, 770 | "targets": [ 771 | { 772 | "datasource": { 773 | "type": "prometheus", 774 | "uid": "KED0l8LVz" 775 | }, 776 | "editorMode": "code", 777 | "expr": "ts_pid_min_repitition_ms", 778 | "legendFormat": "Min Repetition: PID {{pid_hexadecimal}}", 779 | "range": true, 780 | "refId": "A" 781 | }, 782 | { 783 | "datasource": { 784 | "type": "prometheus", 785 | "uid": "KED0l8LVz" 786 | }, 787 | "editorMode": "code", 788 | "expr": "ts_pid_max_repitition_ms", 789 | "hide": false, 790 | "legendFormat": "Max Repetition: PID {{pid_hexadecimal}}", 791 | "range": true, 792 | "refId": "B" 793 | } 794 | ], 795 | "title": "PID Repetition (ms) ", 796 | "type": "timeseries" 797 | }, 798 | { 799 | "datasource": { 800 | "type": "prometheus", 801 | "uid": "KED0l8LVz" 802 | }, 803 | "fieldConfig": { 804 | "defaults": { 805 | "color": { 806 | "mode": "palette-classic" 807 | }, 808 | "custom": { 809 | "axisCenteredZero": false, 810 | "axisColorMode": "text", 811 | "axisLabel": "", 812 | "axisPlacement": "auto", 813 | "barAlignment": 0, 814 | "drawStyle": "line", 815 | "fillOpacity": 0, 816 | "gradientMode": "none", 817 | "hideFrom": { 818 | "legend": false, 819 | "tooltip": false, 820 | "viz": false 821 | }, 822 | "lineInterpolation": "smooth", 823 | "lineWidth": 2, 824 | "pointSize": 1, 825 | "scaleDistribution": { 826 | "type": "linear" 827 | }, 828 | "showPoints": "auto", 829 | "spanNulls": false, 830 | "stacking": { 831 | "group": "A", 832 | "mode": "none" 833 | }, 834 | "thresholdsStyle": { 835 | "mode": "off" 836 | } 837 | }, 838 | "mappings": [], 839 | "thresholds": { 840 | "mode": "absolute", 841 | "steps": [ 842 | { 843 | "color": "green", 844 | "value": null 845 | }, 846 | { 847 | "color": "red", 848 | "value": 80 849 | } 850 | ] 851 | }, 852 | "unit": "pps" 853 | }, 854 | "overrides": [] 855 | }, 856 | "gridPos": { 857 | "h": 8, 858 | "w": 12, 859 | "x": 12, 860 | "y": 17 861 | }, 862 | "id": 10, 863 | "options": { 864 | "legend": { 865 | "calcs": [], 866 | "displayMode": "list", 867 | "placement": "bottom", 868 | "showLegend": true 869 | }, 870 | "tooltip": { 871 | "mode": "single", 872 | "sort": "none" 873 | } 874 | }, 875 | "targets": [ 876 | { 877 | "datasource": { 878 | "type": "prometheus", 879 | "uid": "KED0l8LVz" 880 | }, 881 | "editorMode": "code", 882 | "expr": "ts_pid_min_repitition_ms{}", 883 | "legendFormat": "Min Repetition: PID {{pid_hexadecimal}}", 884 | "range": true, 885 | "refId": "A" 886 | }, 887 | { 888 | "datasource": { 889 | "type": "prometheus", 890 | "uid": "KED0l8LVz" 891 | }, 892 | "editorMode": "code", 893 | "expr": "ts_pid_max_repitition_ms{}", 894 | "hide": false, 895 | "legendFormat": "Max Repetition: PID {{pid_hexadecimal}}", 896 | "range": true, 897 | "refId": "B" 898 | } 899 | ], 900 | "title": "PID Repetition (pkt)", 901 | "type": "timeseries" 902 | } 903 | ], 904 | "refresh": false, 905 | "revision": 1, 906 | "schemaVersion": 38, 907 | "style": "dark", 908 | "tags": [], 909 | "templating": { 910 | "list": [] 911 | }, 912 | "time": { 913 | "from": "2023-04-12T11:39:03.559Z", 914 | "to": "2023-04-12T13:36:19.515Z" 915 | }, 916 | "timepicker": {}, 917 | "timezone": "", 918 | "title": "TSDuck Prometheus", 919 | "uid": "KgOonCL4k", 920 | "version": 3, 921 | "weekStart": "" 922 | } 923 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module tsduck-prometheus 2 | 3 | go 1.18 4 | 5 | require github.com/prometheus/client_golang v1.12.2 6 | 7 | require ( 8 | github.com/beorn7/perks v1.0.1 // indirect 9 | github.com/cespare/xxhash/v2 v2.1.2 // indirect 10 | github.com/golang/protobuf v1.5.2 // indirect 11 | github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect 12 | github.com/prometheus/client_model v0.2.0 // indirect 13 | github.com/prometheus/common v0.32.1 // indirect 14 | github.com/prometheus/procfs v0.7.3 // indirect 15 | golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect 16 | google.golang.org/protobuf v1.26.0 // indirect 17 | ) 18 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 9 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 10 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 11 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 12 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 13 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 14 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 15 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 16 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 17 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 18 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 19 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 20 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 21 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 22 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 23 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 24 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 25 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 26 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 27 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 28 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 29 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 30 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 31 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 32 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 33 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 34 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 35 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 36 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 37 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 38 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 39 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 40 | github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= 41 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 42 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 43 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 44 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 45 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 46 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 47 | github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= 48 | github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 49 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 50 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 51 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 52 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 53 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 54 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 55 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 56 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 57 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 58 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 59 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 60 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 61 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 62 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 63 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 64 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 65 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= 66 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 67 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 68 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= 69 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 70 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 71 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 72 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 73 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 74 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 75 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 76 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 77 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 78 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 79 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 80 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 81 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 82 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 83 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 84 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 85 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 86 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 87 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 88 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 89 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 90 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 91 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 92 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 93 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 94 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 95 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 96 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 97 | github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 98 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 99 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 100 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 101 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 102 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 103 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 104 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 105 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 106 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 107 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 108 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 109 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 110 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 111 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 112 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 113 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 114 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 115 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 116 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 117 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 118 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 119 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 120 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 121 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 122 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 123 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 124 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 125 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 126 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 127 | github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 128 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 129 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 130 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 131 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 132 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 133 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 134 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 135 | github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 136 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 137 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 138 | github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 139 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 140 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 141 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 142 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 143 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= 144 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 145 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 146 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 147 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 148 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 149 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 150 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 151 | github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 152 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 153 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 154 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 155 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 156 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 157 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 158 | github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 159 | github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= 160 | github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= 161 | github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= 162 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 163 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 164 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 165 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= 166 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 167 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 168 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 169 | github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= 170 | github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= 171 | github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= 172 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 173 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 174 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 175 | github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 176 | github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= 177 | github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 178 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 179 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 180 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 181 | github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 182 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 183 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 184 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 185 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 186 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 187 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 188 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 189 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 190 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 191 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 192 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 193 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 194 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 195 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 196 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 197 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 198 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 199 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 200 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 201 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 202 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 203 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 204 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 205 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 206 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 207 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 208 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 209 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 210 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 211 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 212 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 213 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 214 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 215 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 216 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 217 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 218 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 219 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 220 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 221 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 222 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 223 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 224 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 225 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 226 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 227 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 228 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 229 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 230 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 231 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 232 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 233 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 234 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 235 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 236 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 237 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 238 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 239 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 240 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 241 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 242 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 243 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 244 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 245 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 246 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 247 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 248 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 249 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 250 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 251 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 252 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 253 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 254 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 255 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 256 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 257 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 258 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 259 | golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 260 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 261 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 262 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 263 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 264 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 265 | golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 266 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 267 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 268 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 269 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 270 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 271 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 272 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 273 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 274 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 275 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 276 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 277 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 278 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 279 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 280 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 281 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 282 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 283 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 284 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 285 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 286 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 287 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 288 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 289 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 290 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 291 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 292 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 293 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 294 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 295 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 296 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 297 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 298 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 299 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 300 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 301 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 302 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 303 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 304 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 305 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 306 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 307 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 308 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 309 | golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 310 | golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= 311 | golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 312 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 313 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 314 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 315 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 316 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 317 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 318 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 319 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 320 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 321 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 322 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 323 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 324 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 325 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 326 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 327 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 328 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 329 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 330 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 331 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 332 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 333 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 334 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 335 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 336 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 337 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 338 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 339 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 340 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 341 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 342 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 343 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 344 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 345 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 346 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 347 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 348 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 349 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 350 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 351 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 352 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 353 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 354 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 355 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 356 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 357 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 358 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 359 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 360 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 361 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 362 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 363 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 364 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 365 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 366 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 367 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 368 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 369 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 370 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 371 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 372 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 373 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 374 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 375 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 376 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 377 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 378 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 379 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 380 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 381 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 382 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 383 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 384 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 385 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 386 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 387 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 388 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 389 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 390 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 391 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 392 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 393 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 394 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 395 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 396 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 397 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 398 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 399 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 400 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 401 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 402 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 403 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 404 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 405 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 406 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 407 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 408 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 409 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 410 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 411 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 412 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 413 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 414 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 415 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 416 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 417 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 418 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 419 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 420 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 421 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 422 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 423 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 424 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 425 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 426 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 427 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 428 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 429 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 430 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 431 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 432 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 433 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 434 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 435 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 436 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 437 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 438 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 439 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 440 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 441 | google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= 442 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 443 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 444 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 445 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 446 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 447 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 448 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 449 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 450 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 451 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 452 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 453 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 454 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 455 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 456 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 457 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 458 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 459 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 460 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 461 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 462 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 463 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 464 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | "net/http" 9 | "os" 10 | "os/exec" 11 | "strconv" 12 | "strings" 13 | "tsduck-prometheus/models" 14 | 15 | "github.com/prometheus/client_golang/prometheus" 16 | "github.com/prometheus/client_golang/prometheus/promhttp" 17 | ) 18 | 19 | func updatePidValues(multicast, label string, pid models.Pids) { 20 | // PID Bitrate 21 | models.TsPidBitrate.WithLabelValues(multicast, label, fmt.Sprint(pid.Id), strconv.FormatInt(int64(pid.Id), 16), pid.Description).Set(float64(pid.Bitrate)) 22 | // PID Service Count 23 | models.TsPidServiceCount.WithLabelValues(multicast, label, fmt.Sprint(pid.Id), strconv.FormatInt(int64(pid.Id), 16), pid.Description).Set(float64(pid.SeviceCount)) 24 | // PID Discontinuities Count 25 | if pid.Packets.Discontinuities >= 1 { 26 | sum := 0 27 | for sum < pid.Packets.Discontinuities { 28 | sum += 1 29 | models.TsPidDiscontinuity.WithLabelValues(multicast, label, fmt.Sprint(pid.Id), strconv.FormatInt(int64(pid.Id), 16), pid.Description).Inc() 30 | } 31 | } 32 | // Duplicate PID Count 33 | if pid.Packets.Duplicated >= 1 { 34 | sum := 0 35 | for sum < pid.Packets.Duplicated { 36 | sum += 1 37 | models.TsPidDuplicated.WithLabelValues(multicast, label, fmt.Sprint(pid.Id), strconv.FormatInt(int64(pid.Id), 16), pid.Description).Inc() 38 | } 39 | } 40 | } 41 | 42 | func updateServiceValues(multicast, label string, service models.Services) { 43 | // TS bitrate per service 44 | models.TsServiceBitrate.WithLabelValues(multicast, label, strconv.Itoa(service.Id), strconv.Itoa(service.TsId), service.Name, service.Provider, service.TypeName, strconv.Itoa(service.PcrPid), strconv.Itoa(service.PmtPid)).Set(float64(service.Bitrate)) 45 | } 46 | 47 | func updateTsValues(multicast, label string, ts models.Ts) { 48 | // Total TS Bitrate (188byte/pkt) 49 | models.TsBitrate.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Set(float64(ts.Bitrate)) 50 | // PCR TS Bitrate (188byte/pkt) 51 | models.TsPcrBitrate.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Set(float64(ts.PcrBitrate)) 52 | // TS Packet Invalid Sync Count 53 | if ts.Packets.InvalidSyncs >= 1 { 54 | sum := 0 55 | for sum < ts.Packets.InvalidSyncs { 56 | sum += 1 57 | models.TsPacketInvalidSync.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Inc() 58 | } 59 | } 60 | // TS Packet Suspect Ignored Count 61 | if ts.Packets.SuspectIgnored >= 1 { 62 | sum := 0 63 | for sum < ts.Packets.SuspectIgnored { 64 | sum += 1 65 | models.TsPacketSuspectIgnored.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Inc() 66 | } 67 | } 68 | // TS Packet Transport Error Count 69 | if ts.Packets.TransportErrors >= 1 { 70 | sum := 0 71 | for sum < ts.Packets.TransportErrors { 72 | sum += 1 73 | models.TsPacketTeiErrors.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Inc() 74 | } 75 | } 76 | // TS Total PID Count 77 | models.TsPidCount.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Set(float64(ts.Pids.Total)) 78 | // TS PCR PID Count 79 | models.TsPcrPidCount.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Set(float64(ts.Pids.Pcr)) 80 | // TS Unreferenced PID Count 81 | models.TsPidUnferencedCount.WithLabelValues(multicast, label, strconv.Itoa(ts.Id)).Set(float64(ts.Pids.Unreferenced)) 82 | // TsServiceClearCount (future) 83 | // TsServiceScrambledCount (future) 84 | // TsServiceCount (future) 85 | } 86 | 87 | func updateTableValues(multicast, label string, tables models.Tables) { 88 | // PID Max Repitition MS 89 | models.TsPidMaxRepititionMs.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.MaxRepititionMs)) 90 | // PID Max Repitition Pkt 91 | models.TsPidMaxRepititionPkt.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.MaxRepititionPkt)) 92 | // PID Min Repitition MS 93 | models.TsPidMinRepititionMs.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.MinRepititionMs)) 94 | // PID In Repitition Pkt 95 | models.TsPidMinRepititionPkt.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.MinRepititionPkt)) 96 | // PID Repitition MS 97 | models.TsPidRepititionMs.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.RepetitionMs)) 98 | // PID Repitition Pkt 99 | models.TsPidRepititionPkt.WithLabelValues(multicast, label, fmt.Sprint(tables.Pid), strconv.FormatInt(int64(tables.Pid), 16)).Set(float64(tables.RepetitionPkt)) 100 | } 101 | 102 | func readTspOut(multicast, label string, scanner *bufio.Scanner) { 103 | var tsp models.Tsp 104 | 105 | for scanner.Scan() { 106 | s := scanner.Text() 107 | // Hacky way of removing the beginning of the JSON line which prepends TSDucks JSON output 108 | t := strings.Replace(s, "* analyze: ", "", -1) 109 | // Unmarshal JSON into TSP model 110 | json.Unmarshal([]byte(t), &tsp) 111 | 112 | // Update PID metrics 113 | for _, pid := range tsp.Pids { 114 | go updatePidValues(multicast, label, pid) 115 | } 116 | 117 | // Update Service metrics 118 | for _, service := range tsp.Services { 119 | go updateServiceValues(multicast, label, service) 120 | } 121 | 122 | // Update TS metrics 123 | go updateTsValues(multicast, label, tsp.Ts) 124 | 125 | // Update TS table metrics 126 | for _, table := range tsp.Tables { 127 | go updateTableValues(multicast, label, table) 128 | } 129 | } 130 | } 131 | 132 | func launchTsp(multicast, source_address, label string) { 133 | // Launch TSP 134 | cmd := exec.Command("tsp", "-I", "ip", multicast, "-s", source_address, "-P", "analyze", "-i", "1", "--json-line", "-O", "drop") 135 | // TSDuck outputs to stderr 136 | cmdReader, err := cmd.StderrPipe() 137 | if err != nil { 138 | log.Fatal(err) 139 | } else { 140 | fmt.Printf("Started monitoring for %v\n", label) 141 | } 142 | 143 | // Create buffer to read the stderr output 144 | scanner := bufio.NewScanner(cmdReader) 145 | 146 | go func() { 147 | // Read Output Buffer 148 | readTspOut(multicast, label, scanner) 149 | }() 150 | if err := cmd.Start(); err != nil { 151 | log.Fatal(err) 152 | } 153 | if err := cmd.Wait(); err != nil { 154 | log.Fatal(err) 155 | } 156 | } 157 | 158 | func main() { 159 | // Parse Args 160 | args := os.Args[1:] 161 | if len(args) < 1 { 162 | log.Fatal("Not enough arguments! Plase parse at least one input e.g. 225.0.0.1:20000,172.0.0.1,My_Service") 163 | } 164 | 165 | for _, item := range args { 166 | s := strings.Split(item, ",") 167 | if len(s) < 3 { 168 | log.Fatal("Not enough arguments! Required format is multicast:port,source,label, e.g. 225.0.0.1:20000,172.0.0.1,My_Service") 169 | } 170 | // Launch TSDuck (tsp subprocess) 171 | go launchTsp(s[0], s[1], s[2]) 172 | } 173 | 174 | r := prometheus.NewRegistry() 175 | // Register prometheus metrics 176 | r.MustRegister(models.TsBitrate) 177 | r.MustRegister(models.TsPcrBitrate) 178 | r.MustRegister(models.TsPidBitrate) 179 | r.MustRegister(models.TsPidServiceCount) 180 | r.MustRegister(models.TsPidDiscontinuity) 181 | r.MustRegister(models.TsPidDuplicated) 182 | r.MustRegister(models.TsServiceBitrate) 183 | r.MustRegister(models.TsPidMaxRepititionMs) 184 | r.MustRegister(models.TsPidMaxRepititionPkt) 185 | r.MustRegister(models.TsPidMinRepititionMs) 186 | r.MustRegister(models.TsPidMinRepititionPkt) 187 | r.MustRegister(models.TsPidRepititionMs) 188 | r.MustRegister(models.TsPidRepititionPkt) 189 | r.MustRegister(models.TsPacketInvalidSync) 190 | r.MustRegister(models.TsPacketSuspectIgnored) 191 | r.MustRegister(models.TsPacketTeiErrors) 192 | r.MustRegister(models.TsPidCount) 193 | r.MustRegister(models.TsPcrPidCount) 194 | r.MustRegister(models.TsPidUnferencedCount) 195 | 196 | handler := promhttp.HandlerFor(r, promhttp.HandlerOpts{}) 197 | 198 | http.Handle("/metrics", handler) 199 | http.ListenAndServe(":8000", nil) 200 | } 201 | -------------------------------------------------------------------------------- /models/prom.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/prometheus/client_golang/prometheus" 5 | "github.com/prometheus/client_golang/prometheus/promauto" 6 | ) 7 | 8 | var TsBitrate = promauto.NewGaugeVec( 9 | prometheus.GaugeOpts{ 10 | Name: "ts_bitrate_bytes", 11 | Help: "The overall TS bitrate based upon 188 byte TS packet.", 12 | }, 13 | []string{"multicast", "label", "ts_id"}, 14 | ) 15 | 16 | var TsPcrBitrate = promauto.NewGaugeVec( 17 | prometheus.GaugeOpts{ 18 | Name: "ts_pcr_bitrate_bytes", 19 | Help: "The PCR bitrate of the TS based upon 188 byte TS packet.", 20 | }, 21 | []string{"multicast", "label", "ts_id"}, 22 | ) 23 | 24 | var TsPidBitrate = promauto.NewGaugeVec( 25 | prometheus.GaugeOpts{ 26 | Name: "ts_pid_bitrate_bytes", 27 | Help: "The bitrate for an individual PID based upon a 188 byte TS packet.", 28 | }, 29 | []string{"multicast", "label", "pid", "pid_hexadecimal", "description"}, 30 | ) 31 | 32 | var TsPidServiceCount = promauto.NewGaugeVec( 33 | prometheus.GaugeOpts{ 34 | Name: "ts_pid_service_count_total", 35 | Help: "The total number of services within the a given PID in the TS.", 36 | }, 37 | []string{"multicast", "label", "pid", "pid_hexadecimal", "description"}, 38 | ) 39 | 40 | var TsPidDiscontinuity = promauto.NewCounterVec( 41 | prometheus.CounterOpts{ 42 | Name: "ts_pid_discontinuities_total", 43 | Help: "The discontinuities per PID.", 44 | }, 45 | []string{"multicast", "label", "pid", "pid_hexadecimal", "description"}, 46 | ) 47 | 48 | var TsPidDuplicated = promauto.NewCounterVec( 49 | prometheus.CounterOpts{ 50 | Name: "ts_pid_duplicated_total", 51 | Help: "The number of duplicated PIDs seen for a given PID since the start of monitoring.", 52 | }, 53 | []string{"multicast", "label", "pid", "pid_hexadecimal", "description"}, 54 | ) 55 | 56 | var TsServiceBitrate = promauto.NewGaugeVec( 57 | prometheus.GaugeOpts{ 58 | Name: "ts_service_bitrate_bytes", 59 | Help: "The bitrate of each service carried in the TS based upon a 188 byte TS packet.", 60 | }, 61 | []string{"multicast", "label", "service_id", "ts_id", "name", "provider", "type_name", "pcr_pid", "pmt_pid"}, 62 | ) 63 | 64 | var TsPidMinRepititionMs = promauto.NewGaugeVec( 65 | prometheus.GaugeOpts{ 66 | Name: "ts_pid_min_repitition_ms", 67 | Help: "", 68 | }, 69 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 70 | ) 71 | 72 | var TsPidMaxRepititionMs = promauto.NewGaugeVec( 73 | prometheus.GaugeOpts{ 74 | Name: "ts_pid_max_repitition_ms", 75 | Help: "", 76 | }, 77 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 78 | ) 79 | 80 | var TsPidMinRepititionPkt = promauto.NewGaugeVec( 81 | prometheus.GaugeOpts{ 82 | Name: "ts_pid_min_repitition_pkt", 83 | Help: "", 84 | }, 85 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 86 | ) 87 | 88 | var TsPidMaxRepititionPkt = promauto.NewGaugeVec( 89 | prometheus.GaugeOpts{ 90 | Name: "ts_pid_max_repitition_pkt", 91 | Help: "", 92 | }, 93 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 94 | ) 95 | 96 | var TsPidRepititionMs = promauto.NewGaugeVec( 97 | prometheus.GaugeOpts{ 98 | Name: "ts_pid_repitition_ms", 99 | Help: "", 100 | }, 101 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 102 | ) 103 | 104 | var TsPidRepititionPkt = promauto.NewGaugeVec( 105 | prometheus.GaugeOpts{ 106 | Name: "ts_pid_repitition_pkt", 107 | Help: "", 108 | }, 109 | []string{"multicast", "label", "pid", "pid_hexadecimal"}, 110 | ) 111 | 112 | var TsPacketInvalidSync = promauto.NewCounterVec( 113 | prometheus.CounterOpts{ 114 | Name: "ts_packet_invalid_sync_total", 115 | Help: "The number of invalid sync packets detected.", 116 | }, 117 | []string{"multicast", "label", "ts_id"}, 118 | ) 119 | 120 | var TsPacketSuspectIgnored = promauto.NewCounterVec( 121 | prometheus.CounterOpts{ 122 | Name: "ts_packet_suspect_ignored_total", 123 | Help: "The number of suspect packets ignored.", 124 | }, 125 | []string{"multicast", "label", "ts_id"}, 126 | ) 127 | 128 | var TsPacketTeiErrors = promauto.NewCounterVec( 129 | prometheus.CounterOpts{ 130 | Name: "ts_packet_tei_count_total", 131 | Help: "The number of transport errors detected.", 132 | }, 133 | []string{"multicast", "label", "ts_id"}, 134 | ) 135 | 136 | var TsPidCount = promauto.NewGaugeVec( 137 | prometheus.GaugeOpts{ 138 | Name: "ts_pid_count_total", 139 | Help: "The total number of pids detected in the TS.", 140 | }, 141 | []string{"multicast", "label", "ts_id"}, 142 | ) 143 | 144 | var TsPcrPidCount = promauto.NewGaugeVec( 145 | prometheus.GaugeOpts{ 146 | Name: "ts_pid_pcr_count_total", 147 | Help: "The total number of PCR pids detected in the TS.", 148 | }, 149 | []string{"multicast", "label", "ts_id"}, 150 | ) 151 | 152 | var TsPidUnferencedCount = promauto.NewGaugeVec( 153 | prometheus.GaugeOpts{ 154 | Name: "ts_pid_unreferenced_count_total", 155 | Help: "The total number of unreferenced pids detected in the TS.", 156 | }, 157 | []string{"multicast", "label", "ts_id"}, 158 | ) 159 | 160 | // Future additions 161 | /* var TsServiceClearCount = promauto.NewGaugeVec( 162 | prometheus.GaugeOpts{ 163 | Name: "ts_service_clear_count_total", 164 | Help: "The total number of clear services detected in the TS.", 165 | }, 166 | []string{"multicast", "label", "ts_id"}, 167 | ) 168 | 169 | var TsServiceScrambledCount = promauto.NewGaugeVec( 170 | prometheus.GaugeOpts{ 171 | Name: "ts_service_scrambled_count_total", 172 | Help: "The total number of scrambled services detected in the TS.", 173 | }, 174 | []string{"multicast", "label", "ts_id"}, 175 | ) 176 | 177 | var TsServiceCount = promauto.NewGaugeVec( 178 | prometheus.GaugeOpts{ 179 | Name: "ts_service_count_total", 180 | Help: "The total number of clear and scrambled services detected in the TS.", 181 | }, 182 | []string{"multicast", "label", "ts_id"}, 183 | ) */ 184 | -------------------------------------------------------------------------------- /models/tsp.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type Tsp struct { 4 | Pids []Pids `json:"pids"` 5 | Services []Services `json:"services"` 6 | Tables []Tables `json:"tables"` 7 | Time Time `json:"time"` 8 | Ts Ts `json:"ts"` 9 | } 10 | 11 | type Pids struct { 12 | Audio bool `json:"audio"` 13 | Bitrate int `json:"bitrate"` 14 | Bitrate204 int `json:"bitrate-204"` 15 | Description string `json:"description"` 16 | ECM bool `json:"ecm"` 17 | EMM bool `json:"emm"` 18 | Global bool `json:"global"` 19 | Id int `json:"id"` 20 | InvalidPesPrefix bool `json:"invalid-pes-prefix"` 21 | IsScrambled bool `json:"is-scrambled"` 22 | Packets pidPackets `json:"packets"` 23 | PES int `json:"pes"` 24 | PESStreamId int `json:"pes-stream-id"` 25 | PMT bool `json:"pmt"` 26 | SeviceCount int `json:"service-count"` 27 | Services []int `json:"services"` 28 | T2MI bool `json:"t2mi"` 29 | UnitStart int `json:"unit-start"` 30 | Unreferenced bool `json:"unreferenced"` 31 | Video bool `json:"video"` 32 | } 33 | 34 | type pidPackets struct { 35 | AF int `json:"af"` 36 | Clear int `json:"clear"` 37 | Discontinuities int `json:"discontinuities"` // 38 | Duplicated int `json:"duplicated"` // 39 | InvalidScrambling int `json:"invalid-scrambling"` 40 | PCR int `json:"pcr"` 41 | Scrambled int `json:"scrambled"` 42 | Total int `json:"total"` 43 | } 44 | 45 | type Services struct { 46 | Bitrate int `json:"bitrate"` 47 | Bitrate204 int `json:"bitrate-204"` 48 | Components serviceComponents `json:"components"` 49 | Id int `json:"id"` 50 | IsScrambled bool `json:"is-scrambled"` 51 | Name string `json:"name"` 52 | OriginalNetworkId int `json:"original-network-id"` 53 | Packets int `json:"packets"` 54 | PcrPid int `json:"pcr-pid"` 55 | Pids []int `json:"pids"` 56 | PmtPid int `json:"pmt-pid"` 57 | Provider string `json:"provider"` 58 | SSU bool `json:"ssu"` 59 | T2MI bool `json:"t2mi"` 60 | TsId int `json:"tsid"` 61 | Type int `json:"type"` 62 | TypeName string `json:"string"` 63 | } 64 | 65 | type serviceComponents struct { 66 | Clear int `json:"clear"` 67 | Scrambled int `json:"scrambled"` 68 | Total int `json:"total"` 69 | } 70 | 71 | type Tables struct { 72 | FirstVersion int `json:"first-version"` 73 | LastVersion int `json:"last-version"` 74 | MaxRepititionMs int `json:"max-repetition-ms"` // 75 | MaxRepititionPkt int `json:"max-repetition-pkt"` // 76 | MinRepititionMs int `json:"min-repetition-ms"` // 77 | MinRepititionPkt int `json:"min-repetition-pkt"` // 78 | Pid int `json:"pid"` 79 | RepetitionMs int `json:"repetition-ms"` // 80 | RepetitionPkt int `json:"repetition-pkt"` // 81 | Sections int `json:"sections"` 82 | Tables int `json:"tables"` 83 | Tid int `json:"tid"` 84 | TidExt int `json:"tid-ext"` 85 | Versions []int `json:"versions"` 86 | } 87 | 88 | type Time struct { 89 | Local timeLocale `json:"local"` 90 | UTC timeLocale `json:"utc"` 91 | } 92 | 93 | type timeLocale struct { 94 | System timeDatum `json:"system"` 95 | } 96 | 97 | type timeDatum struct { 98 | First timeFormat `json:"first"` 99 | Last timeFormat `json:"last"` 100 | } 101 | 102 | type timeFormat struct { 103 | Date string `json:"date"` 104 | SecondsSince2000 int `json:"seconds-since-2000"` 105 | Time string `json:"time"` 106 | } 107 | 108 | type Ts struct { 109 | Bitrate int `json:"bitrate"` 110 | Bitrate204 int `json:"bitrate-204"` 111 | Bytes int `json:"bytes"` 112 | Duration int `json:"duration"` 113 | Id int `json:"id"` 114 | Packets tsPackets `json:"packets"` 115 | PcrBitrate int `json:"pcr-bitrate"` 116 | PcrBitrate204 int `json:"pcr-bitrate204"` 117 | Pids tsPids `json:"pids"` 118 | Services tsServices `json:"services"` 119 | UserBitrate int `json:"user-bitrate"` 120 | UserBitrate204 int `json:"user-bitrate-204"` 121 | } 122 | 123 | type tsPackets struct { 124 | InvalidSyncs int `json:"invalid-syncs"` 125 | SuspectIgnored int `json:"suspect-ignored"` 126 | Total int `json:"total"` 127 | TransportErrors int `json:"transport-errors"` 128 | } 129 | 130 | type tsPids struct { 131 | Clear int `json:"clear"` 132 | Global tsPidsGlobal `json:"global"` 133 | Pcr int `json:"pcr"` 134 | Scrambled int `json:"scrambled"` 135 | Total int `json:"total"` 136 | Unreferenced int `json:"unreferenced"` 137 | } 138 | 139 | type tsPidsGlobal struct { 140 | Bitrate int `json:"bitrate"` 141 | Bitrate204 int `json:"bitrate-204"` 142 | Clear int `json:"clear"` 143 | IsScrambled bool `json:"is-scrambled"` 144 | Packets int `json:"packets"` 145 | Pids []int `json:"pids"` 146 | Scrambled int `json:"scrambled"` 147 | } 148 | 149 | type tsServices struct { 150 | Clear int `json:"clear"` 151 | Scrambled int `json:"scrambled"` 152 | Total int `json:"total"` 153 | } 154 | --------------------------------------------------------------------------------