http request with åäö variables

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
totte
Posts: 55
Joined: Wed May 30, 2007 3:40 am

http request with åäö variables

Post by totte »

Hi

Trying to make an http request from an alertprofile when it sends åäö characters from some variables

Depending on what variable is used å is either Ã¥ (%folder%) and ? in %fvar_variable%

This is what is sent
{
"message": "Sk?netrafiken/%fvar_servername%/Skånetrafiken/Ping: fel",
"description": "",
"alias": "56156",
"priority": "P1",
"details": {
"Application": "Skånetrafiken",
"Server": "%fvar_servername%",
"Customer": "Sk?netrafiken",
"Reply": "",
"Status": "Unknown host",
"Recurrences": "4",
"RelatedUrl": "",
"CreateErrand": "https://pts.hogia.se/h2h/?HLTemplate=In ... 6156#page1"
},
"tags": [
"Sk?netrafiken",
"Skånetrafiken",
"%fvar_servername%"
]
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor version?
Please provide complete HTTP header - HostMonitor may use different encoding rules depending on specified content-type and other parameters

Regards
Alex
totte
Posts: 55
Joined: Wed May 30, 2007 3:40 am

complete post

Post by totte »

Hi here is the complete message

POST https://api.eu.opsgenie.com/v2/alerts
Host: api.eu.opsgenie.com
Content-Type: application/json
Authorization: xxxxx-xxxx-xxx-xxx-xxxxxx

{
"message": "%fvar_custname%/%fvar_servername%/%fvar_appdesc%%Folder%/%testname%",
"description": "%commentline1%",
"alias": "%testid%",
"priority": "P1",
"details": {
"Application": "%fvar_appdesc%%Folder%",
"Server": "%fvar_servername%",
"Customer":"%fvar_custname%",
"Reply": "%reply%",
"Status": "%status%",
"Recurrences": "%Recurrences%",
"RelatedUrl": "%RelatedUrl%",
"CreateErrand": "https://xyz.se/h2h/?HLTemplate=Incident ... tid%#page1"
},
"tags": [
"%fvar_custname%",
"%fvar_appdesc%%Folder%",
"%fvar_servername%"
]
}
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor version?
? in %fvar_variable%
We can correct this.
If you are using latest version ( 12.98 ), please contact support @ks-soft.net, we will provide update.
å is either Ã¥ (%folder%)
Looks like that's how system or web server or browser encodes-decodes Unicode->UTF8->Unicode.
Is that wrong (å <> Ã¥)?

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS
We cannot reproduce problem related to å character. May be your web server does not translate UTF8 correctly?
Or may be there are some other characters that look the same...

Regards
Alex
totte
Posts: 55
Joined: Wed May 30, 2007 3:40 am

Hi

Post by totte »

I would like to have it translated to å if possible

the ? character make the webapi return bad request. Ã¥ is not translated but dosen´t return bad request

the weird part is that i "message" %folder% is translated to å but in "application" it is returned as Ã¥
totte
Posts: 55
Joined: Wed May 30, 2007 3:40 am

hm version

Post by totte »

Hi

we are using version 12.99c version of hostmonitor
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

the ? character make the webapi return bad request.
As I said we can correct this, please contact support, we will provide update.
the weird part is that i "message" %folder% is translated to å but in "application" it is returned as Ã¥
What exactly application?
We think its not HostMonitor problem.

Regards
Alex
totte
Posts: 55
Joined: Wed May 30, 2007 3:40 am

application

Post by totte »

Have sent to support

I´m trying to send to Opsgenie API. But when verifiying I´m using https://webhook.site

both returns %folder% varible å the same way.
Post Reply