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

Set ChannelSetting #76

Closed
ClemensLasslesberger opened this issue Apr 18, 2019 · 3 comments
Closed

Set ChannelSetting #76

ClemensLasslesberger opened this issue Apr 18, 2019 · 3 comments
Labels
bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version

Comments

@ClemensLasslesberger
Copy link

Hi

I Tried to set a channel Proberty with the API using smth like this.

Get-Sensor -Id ##### |Get-Channel -Id # |Set-ChannelSetting LimitsEnabled False
Get-Sensor -Id ##### |Get-Channel -Id # |Set-ChannelSetting ValueLookup eventlog

When I Try to change this it doesnt switch to the lookup values. Only if I open the channel in the gui and press ok or apply, it switches to the Lookup I specified. I Figured out that it has something to do with the DisplayLastValue setting..

Kind Regards and many thanks upfront

C

@lordmilko
Copy link
Owner

Hi @ClemensLasslesberger,

It seems when the ValueLookup is specified, PRTG requires it be specified in the form

<name>|<name>

PrtgAPI is not currently serializing it in this format. It appears that certain sensors (such as SNMP, which my Integration Test suite tests against) may not be as sensitive to this incorrect format, hence why this issue has not been detected.

Are you able to advise whether it works if you execute the following?

Get-Sensor -Id ##### |Get-Channel -Id # |Set-ChannelSetting ValueLookup "eventlog|eventlog"

Regards,
lordmilko

@ClemensLasslesberger
Copy link
Author

Hey Lord Milko

Thank you very much this fixed the issue.

Cheers,
Clemens

@lordmilko lordmilko added the bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version label Apr 19, 2019
@lordmilko
Copy link
Owner

Hi @ClemensLasslesberger,

Please be advised that PrtgAPI 0.9.7 has now been released, which includes a fix for this issue. To update to the latest version of PrtgAPI, run

Update-Module PrtgAPI

and reopen PowerShell. For a full list of changes in this release, including any breaking changes, please see the release notes

Regards,
lordmilko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that have been confirmed to be bugs in PrtgAPI and will be fixed in a future version
Projects
None yet
Development

No branches or pull requests

2 participants