Skip to content
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

Tag with single \ ends up with \\\\ and invalid tag format? #36

Open
MrDibbley opened this issue Jun 27, 2022 · 1 comment
Open

Tag with single \ ends up with \\\\ and invalid tag format? #36

MrDibbley opened this issue Jun 27, 2022 · 1 comment
Assignees
Labels

Comments

@MrDibbley
Copy link

MrDibbley commented Jun 27, 2022

reading vmware guest disk space and returing free / used space along with tagging vm name and drive path

example drive path is C:\ being returned from vmware, but when calling Write-Influx verbose shows Path=C:\\ now and when invoke-restmethod is called its is now c:\\ and flags invalid tag format\nunamble to parse

i can kind of fudge it by adding a white space after the path, but then they all end up in influx as C:\\ and not C:\

Thanks

@markwragg markwragg added the bug label Jul 1, 2022
@andrasg
Copy link

andrasg commented Sep 4, 2023

I am seeing this too with a backslash in the tag value.

$datasourceName = "J:\"

ConvertTo-InfluxLineString returns:

datasources,dataSourceId=50e028f8-39e7-4c9d-a1f2-da779c8f1726,datasourceName=J:\\,fullName=Userdata-zeus-J:,protectionGroupName=Userdata replicaUsedSpace=255850815488,oldestDiskRecoveryPointTime="2023-08-22T10:09:14.000Z",alertCount=0,latestDiskRecoveryPointTime="2023-09-04T18:13:53.000Z",latestRecoveryPointTime="2023-09-04T18:13:53.000Z",state="Valid",activity="Idle",age=8321.272957,replicaSize=373062369280

Sending the same objects results in:

Invoke-RestMethod : {"code":"invalid","message":"unable to parse 'datasources,datasourceName=J:\\\\,protectionGroupName
=Userdata,fullName=Userdata-zeus-J:,dataSourceId=50e028f8-39e7-4c9d-a1f2-da779c8f1726 ...

@markwragg markwragg self-assigned this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants