Skip to content

Commit

Permalink
Produce zip additionally and match dist folder name with plugin id wh…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowee committed Mar 22, 2021
1 parent f9102ba commit 2dd45fa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ jobs:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
run:
yarn sign
- name: Create tarball
- name: Create Tarball
run:
tar czf /tmp/dist.tar.gz --transform s/^dist/traceroute-map-panel/ dist/
tar czf /tmp/dist.tar.gz --transform s/^dist/gowee-traceroutemap-panel/ dist/
# git archive --format=tar.gz -o /tmp/src.tar.gz --prefix=traceroute-map-panel/ ${{ github.ref }}
- name: Create Zip from Tarball
run: |
cd /tmp
tar xzf dist.tar.gz
zip -r dist.zip gowee-traceroutemap-panel/
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -62,7 +67,7 @@ jobs:
env:
GITHUB_REF: ${{ github.ref }}
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
- name: Upload Release Asset - Dist
- name: Upload Release Asset - Dist (tar.gz)
id: upload-release-asset-dist
uses: actions/upload-release-asset@v1
env:
Expand All @@ -72,6 +77,16 @@ jobs:
asset_path: /tmp/dist.tar.gz
asset_name: dist-${{ steps.get_tag.outputs.TAG }}.tar.gz
asset_content_type: application/tar+gzip
- name: Upload Release Asset - Dist (zip)
id: upload-release-asset-dist
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /tmp/dist.zip
asset_name: dist-${{ steps.get_tag.outputs.TAG }}.zip
asset_content_type: application/zip
- name: "Push to Release Branch"
run: |
git add -f dist/
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
![CI status badge](https://github.com/Gowee/traceroute-map-panel/workflows/CI/badge.svg)
[![release badge](https://img.shields.io/github/v/release/Gowee/traceroute-map-panel.svg)](https://github.com/Gowee/traceroute-map-panel/releases/latest)
![tested on grafana 7.4.2](https://img.shields.io/static/v1?label=tested%20on&message=Grafana%207.4.2&color=green)
# Traceroute Map Panel
Traceroute Map Panel is a Grafana panel that visualize the traceroute hops in a map, just like [Besttrace](https://www.ipip.net/product/client.html).

Expand Down Expand Up @@ -82,6 +83,10 @@ If routing is dynamic (e.g. multiple route paths for one src-dest pair), paths d

So it is generally a good idea to replace the default `$timeFilter` with a small range filter, such as `${__to}ms - 5m <= time AND time <= ${__to}ms` (last 5 mins in the time range).

### Telegraf config
A typical execution of mtr might take roughly a quarter of seconds to finish its hop probing. To avoid unnecessary work, especially when multiple mtr commands are configured, a bigger collection interval should be specified under `[[inputs.exec]]` to overwrite the global short default. Depending on the actual workload, `interval = 5m` or `1m` / `3m` / `10m` / ... would be reasonable. It is recommended to match this with [the one specifed in query](#time-filter). Besides, sometimes `timeout` needs to be increased (e.g. to `60s`) when there are multiple mtr commands to counter jam even though they are parallelized.
<!-- So the `timeout` should be set to a reasonable value in case its execution is terminated before finishing. The value given in the sample -->

### Invalid Schema
For "Invalid Schema" error, the problem might be just mismatched data schema. Or, the query data might not be [*Formatted as Table*](#query-in-grafana)) for the InfluxDB datasource.

Expand Down

0 comments on commit 2dd45fa

Please sign in to comment.