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

Question #167

Closed
2 tasks
mafer0410 opened this issue Sep 4, 2020 · 6 comments
Closed
2 tasks

Question #167

mafer0410 opened this issue Sep 4, 2020 · 6 comments
Labels
question Questions raised by people who don't know how to program or read the wiki :P

Comments

@mafer0410
Copy link

What are you trying to do, and to what extent does PrtgAPI provide existing functionality around this?

a query,
Is there a way to pause a sensor automatically, that is, every day?

Is this something that has some sort of parallel in the PRTG UI? If so where do you go/how do you normally do it?

Due Dilligance
Please enter an 'x' between the brackets to indicate you have done these

  • I've read the wiki and am sure this feature doesn't already exist
  • This is a general feature that belongs in PrtgAPI and isn't highly specific to my scenario
@mafer0410 mafer0410 added the proposed-enhancement Enhancements proposed by people helpfully using the Feature Request template! label Sep 4, 2020
@lordmilko lordmilko added the question Questions raised by people who don't know how to program or read the wiki :P label Sep 4, 2020
@lordmilko
Copy link
Owner

lordmilko commented Sep 4, 2020

Hi @mafer0410,

PrtgAPI simply exposes the underlying PRTG HTTP API in an easy to use framework.

In regards to your query, you have two options

  1. If the schedule is going to be same every day, you can modify the Schedule property normally found on the object's Settings page
  2. If you'd like to have greater control over which objects are paused and when, you can setup a Scheduled Task on one of your servers that periodically runs (e.g. once every hour) and dynamically calculates which objects should be paused and then pauses them with the Pause-Object cmdlet

Regards,
lordmilko

@mafer0410
Copy link
Author

mafer0410 commented Sep 5, 2020 via email

@lordmilko
Copy link
Owner

Hi @mafer0410,

Yes, you would write a PowerShell script that determines the sensors to be paused and then pauses them with the Pause-Object cmdlet

@mafer0410
Copy link
Author

mafer0410 commented Sep 6, 2020 via email

@lordmilko lordmilko removed the proposed-enhancement Enhancements proposed by people helpfully using the Feature Request template! label Sep 6, 2020
@lordmilko
Copy link
Owner

lordmilko commented Sep 6, 2020

Hi @mafer0410,

Yes. Please see the wiki for more information on how to use PrtgAPI

You will need to coordinate the time your Scheduled Task runs with the code that you write in your script to achieve the desired outcome

@mafer0410
Copy link
Author

mafer0410 commented Sep 21, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions raised by people who don't know how to program or read the wiki :P
Projects
None yet
Development

No branches or pull requests

2 participants