Prerequisites
- Download and install the Site24x7 server monitoring agent (Linux | Windows) on the server where you plan to run the plugin.
- Ensure you have Python 3 or a higher version running in your server.
Plugin installation
- Create a folder named yugabyte
- Download the yugabyte.py and the yugabyte.cfg files from our GitHub repository and place them in the yugabyte folder.
wget https://raw.githubusercontent.com/site24x7/plugins/master/yugabyte/yugabyte.py && sed -i "1s|^.*|#! $(which python3)|" yugabyte.py
wget https://raw.githubusercontent.com/site24x7/plugins/master/yugabyte/yugabyte.cfg
- To check if the plugin is working, execute the command below with appropriate arguments, and check for a valid JSON output with applicable metrics and their corresponding values.
python3 yugabyte.py --host localhost --port 8080 --username yugabyte --password yugabyte
- Add the applicable configurations in the yugabyte.cfg file.
[yugabyte-server]
host = "localhost"
port = "5433"
username = "yugabyte"
password = "yugabyte"
- Follow the steps in this article to learn how to run the Python script on Windows Server. You don't need to do this for Linux.
- Move the yugabyte folder to the Site24x7 server monitoring plugins directory:
For Linux: /opt/site24x7/monagent/plugins/
For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\
The agent will automatically execute the plugin within five minutes and display performance data in Site24x7.
To view the plugin monitor and associated performance charts:
- Log in to Site24x7.
- Navigate to Plugins and click the required monitor.
Prerequisites
- Download and install the Site24x7 server monitoring agent (Linux | Windows) on the server where you plan to run the plugin.
- Ensure you have Python 3 or a higher version running in your server.
Plugin installation
- Create a folder named yugabyte_custom_query.
- Download the yugabyte_customquery.py, yugabyte_customquery.cfg, and query.sql files from our GitHub repository and place them in the yugabyte_custom_query folder.
wget https://raw.githubusercontent.com/site24x7/plugins/master/yugabyte_custom_query/yugabyte_custom_query.py && sed -i "1s|^.*|#! $(which python3)|" yugabyte_custom_query.py
wget https://raw.githubusercontent.com/site24x7/plugins/master/yugabyte_custom_query/yugabyte_custom_query.cfg
wget https://raw.githubusercontent.com/site24x7/plugins/master/yugabyte_custom_query/query.sql
- Enter your custom query in the query.sql file.
- To check if the plugin is working, execute the command below with appropriate arguments, and check for a valid JSON output with applicable metrics and their corresponding values.
python3 yugabyte_custom_query.py --host "localhost" --port "5433" --username "yugabyte" --password "yugabyte" --db 'demo'
- Add the applicable configurations in the yugabyte_custom_query.cfg file.
[Demo]
host = "localhost" port = "5433"
username = "yugabyte"
password = "yugabyte"
db = "demo"
- Follow the steps in this article to learn how to run the Python script on Windows Server. You don't need to do this for Linux.
- Move the yugabyte_custom_query folder to the Site24x7 server monitoring plugins directory:
For Linux: /opt/site24x7/monagent/plugins/
For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\
The agent will automatically execute the plugin within five minutes and display the performance data in Site24x7.
After the first execution, two files will be created:
log_pattern.txt: Contains the query output log pattern.
query_output*.txt: Stores the query output data.
Follow the steps below to create a custom log type:
- Use logpattern.txt and queryoutput*.txt to define a custom log type:
Follow this guide to set up a custom log type.
- Configure a log profile for the new log type:
Refer to this guide to create a log profile.
- Map the log file paths for log tracking:
Linux: /opt/site24x7/monagent/plugins/yugabytecustomquery/query_output*
Windows: C:\Program Files
(x86)\Site24x7\WinAgent\monitoring\Plugins\yugabytecustomquery\query_output*
Once the custom app logs are set up, you will be able to continuously monitor your query outputs in Site24x7.
To view the plugin monitor and associated performance charts:
- Log in to Site24x7.
- Navigate to Plugins and click the required monitor.