Need to monitor all devices that are connected to the Prime infrastructure in proactive. For that got a script, this will run every 5 minutes to get information.
- The first Section connect to the API and get all devices with status Unreachable.
- The Second section connect to the API and get all new events that contain "is down" into description
- The Third section connect to the API and get all new events that contain "is up" into description.
This means got 3 connections every 5 minutes to the API.
- But when tried to make the script run every 10 minutes or 15 minutes is showing Error.
- When the script starts everything goes well. But after 30 minutes when tried to connect to the API, I receive this error :
The remote server returned an error: (401) Unauthorized
- Can you confirm: you are receiving successful responses (HTTP status 200) for about 30 minutes and then the 401 errors start happening.
- What version of Prime Infrastructure are you running.
- Do you have TACACS, SSO, or any other AAA provider enabled on Prime Infrastructure.
- Can you include the body of the response you get from the server when the 401 happens.
just changed the request by HttpWebRequest in Asp.net
And added KeepAlive = false
And now everything work fine.
Comments
0 comments
Please sign in to leave a comment.