Essentials for Monitoring vRx and vRx's Proxy
Monitoring vRx is possible using your current IT monitoring solution. Since vRx is a cloud based SaaS, you don't have to worry about monitoring most of it. However, If you wish to further monitor your vRx related resources, follow this guideline:
What Should I Monitor?
vRx Agent
- Topia service is up and running
- Successful ping to proxy OR Successful ping to vicarius-installer.s3.amazonaws.com
vRx Proxy (Ubuntu Server Running Squid)
- CPU utilization of under 80%
- Memory utilization of under 80%
- Free disk space of under 80% in all mounted file systems
- Server has enough free disk space where squid is mounted (+10%)
- Successful ping to server
- Successful ping from server to vicarius-installer.s3.amazonaws.com
- Squid service is up and running
- Server is listening to inbound traffic on port 3128*
*By default, squid server will listen on this port. If else, adjust to the port number accordingly
Complementary Resources
- Zabbix template and commands for monitoring squid proxy
Note: Further templates for Linux/Windows servers available on the Zabbix website - Useful commands for checking the proxy
- Addresses and ports to open for vRx
What Should I Do if I Don't Have a Monitoring Solution?
You can use the combination of vRx's Auto Action capabilities with an Automating platform in order to monitor your vRx proxy/service. Estimated set up time - 15min.
Tutorial - Daily monitoring and Email Notification for vRx's Proxy Service (Squid)
Below is an example of daily proxy monitoring and email notification regarding the status of your squid proxy using Zappier automation tool. Please adapt this tutorial to the automation tool of your choosing.
Overview of the 5 main steps:
1 |
vRx - Create a reoccurring run script auto action in vRx, checking the status of the squid service |
2 | Automation Tool - Create a Scheduled Automation |
3 | Automation Tool - Get your Proxy's Service Status Using a GET Request |
4 | Automation Tool - Apply a Filter (Optional) |
5 | Automation Tool - Send an email notification |
1. vRx - Create a reoccurring run script auto action in vRx, checking the status of the squid service
- When scheduling the auto action, choose a time interval in which you wish to check vRx's proxy status
- Use the following command:
service squid status
Tip: In vRx, choose a scheduling option that is also available In your automation platform. In the above example, the action was set to run "Daily", at 9:00AM
Not sure how to configure and run auto actions? Check out our guide
2. Automation Tool - Create a Scheduled Automation
- Make sure that the time interval matches between your created auto action and the automation tool (vRx's "Daily" = Zappier's "Every Day")
- Make sure that the automation tool runs after vRx's auto action, since the next step will be fetching the result of vRx's auto action, using the automation tool
Note: In our example, vRx's auto action runs daily at 9AM, while the automation runs afterwards, at 10AM
3. Automation Tool - Get your Proxy's Service Status Using a GET Request
- This step queries the result of your created auto action using an API GET request
- A prerequisite for this step is creating a vRx API key. Here is how to do that
- A prerequisite for this step is installing vRx agent on the proxy server
- Find vRx's Hash of your proxy server:
- In "Asset" view, search for the proxy server's name and click it
- Copy the machine's hash from the URL
URL
https://<< YOUR DASHBOARD NAME>>.vicarius.cloud/vicarius-external-data-api/taskEndpointsEvent/filter
Query Parameters
from | 0 |
size | 1 |
sort | -analyticsEventCreatedAt |
q |
taskEndpointsEventTask.taskAutomation.automationName=='<<AUTO ACTION NAME>>'; taskEndpointsEventEndpoint.endpointHash==<<YOUR PROXY SERVER'S HASH>> |
Headers
vicarius-token | <<YOUR API KEY>> |
Note: Replace <<YOUR DASHBOARD NAME>> with your tenant's name.
Ex. https://partner.vicarius.cloud/vicarius-external-data-api/taskEndpointsEvent/filter
Note: Replace <<YOUR AUTO ACTION NAME>> with the name of the auto action you have created during step one.
Ex. taskEndpointsEventTask.taskAutomation.automationName=='Proxy Daily Check';
4. Automation Tool - Apply a Filter (Optional)
- Decide if the automation will continue to the next step based on a certain condition
Conditions Setup
Server Response Object Task Endpoints Event Organization Endpoint Script Commands Organization Endpoint Script Commands Output | (Text) Contains | Active: inactive |
Server Response Object Task Endpoints Event Organization Endpoint Script Commands Organization Endpoint Script Commands Output | (Text) Contains | status=1/FAILURE |
5. Automation Tool - Send a notification
- Send an email notification containing the properties you wish to include in the email
- The properties are any of the properties included as a part of the GET request from previous step 3
- In our example, we chose 2 properties - Date, and Message
Properties included in our example
Property Generic name | Name In Zappier |
analyticsEventUpdatedAt | Server Response Object Analytics Event Updated At Date Object |
organizationEndpointScriptCommandsOutput | Server Response Object Task Endpoints Event Organization Endpoint Script Commands Organization Endpoint Script Commands Output |