Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WILDCARDs and TLS configuration added #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
snuids wants to merge 2 commits into grafana:main
base: main
Choose a base branch
Loading
from snuids:main
Open

Conversation

@snuids
Copy link

@snuids snuids commented Dec 18, 2022
edited
Loading

I required the TLS config to connect to AMAZON. I also wanted to use wildcard subscritions in order to listens to multiple topics in a single subscription.

Tested with AWS IOT core.

I learned GO this morning so I could have done some things stupidly. Coming from the C++, GO looks nice.

AntonOellerer and graydenshand reacted with thumbs up emoji
Copy link

CLAassistant commented Dec 18, 2022
edited
Loading

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@snuids snuids changed the title (削除) WILDCARDs and TLC added (削除ここまで) (追記) WILDCARDs and TLS configuration added (追記ここまで) Dec 19, 2022
Copy link

Hi, this would be fantastic - is there any update?

Copy link

+1

Copy link

Recommend changing this line , adding the TCPS scheme
Current:
tooltip="Supported schemes: TCP (tcp://), TLS (tls://), or WebSocket (ws://)"
Suggested:
tooltip="Supported schemes: TCP (tcp://), TCPS (tcps://), TLS (tls://), or WebSocket (ws://)"

TCPS is the protocol I needed to use to get this to work with our AWS broker.

Copy link
Author

snuids commented Nov 10, 2023

Hi guys thanks for your positive comments, but I did not have any news from Grafana since 10 months :-(

Comment on lines +113 to +121
var payload = msg.Payload()
var data map[string]interface{}
err := json.Unmarshal([]byte(msg.Payload()), &data)
data["Topic"] = msg.Topic()
if err == nil {
log.DefaultLogger.Info("%s", data)
payload, _ = json.Marshal(data)
}

Copy link
Contributor

@NiklasCi NiklasCi Jan 23, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var payload = msg.Payload()
var data map[string]interface{}
err := json.Unmarshal([]byte(msg.Payload()), &data)
data["Topic"] = msg.Topic()
if err == nil {
log.DefaultLogger.Info("%s", data)
payload, _ = json.Marshal(data)
}
var data map[string]interface{}
err := json.Unmarshal([]byte(msg.Payload()), &data)
if err != nil {
log.DefaultLogger.Error("Failed to unmarshal payload of", msg)
return
}
data["Topic"] = msg.Topic()
payload, err := json.Marshal(data)
if err != nil {
log.DefaultLogger.Error("Failed to marshal data to new payload", data)
return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@NiklasCi NiklasCi NiklasCi left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /