8d0959b21c
Refactor fallback logic for submetrics
...
- Updated condition to check maxage existence before comparison.
2024-06-04 16:59:23 +02:00
9707a3cfb9
Add check for empty array before accessing elements.
...
- Added a condition to check for an empty array before accessing its elements in the getArrayValue function. This prevents potential errors when trying to access values from an empty array.
2024-06-04 16:51:05 +02:00
dcf62d3865
Add metrics_cache.json to gitignore and implement cache fallback logic
...
The commit adds metrics_cache.json to .gitignore and implements cache fallback logic in index.php for handling metric values.
2024-06-04 16:50:53 +02:00
fd8a67c23c
Refactor conditional logic for response handling
...
- Adjusted code to handle different scenarios when processing responses.
2024-06-04 13:22:16 +02:00
439d658d14
Refactor error handling for command execution
...
- Added try-catch block to handle exceptions during command execution.
2024-06-04 13:20:43 +02:00
e004a1002e
Refactor handling of HTTP response data
...
- Added condition to check status code for response body
- Updated logic for determining presence of response
2024-06-04 07:06:40 +02:00
069e550a3f
Refactor metric retrieval and display
...
Improved handling of submetrics for better data organization and presentation. Updated metric values based on retrieved data, ensuring accurate representation in the metrics template file.
2024-06-03 23:47:40 +02:00
41f2ddea37
Reorder conditional for CLI check, then URI comparison.
...
- Reordered the condition to first check for CLI mode before URI comparison.
2024-06-03 23:41:42 +02:00
24f1f6c974
Add content type header for metrics endpoint
...
Set the Content-Type header to 'text/plain; version=0.0.4' for the '/metrics' endpoint and CLI requests.
2024-06-03 19:48:39 +02:00
6f26907181
Adjust handling of boolean values in metrics output
...
Ensure boolean values are converted to integers for consistency.
2024-06-03 19:48:39 +02:00
aea6873ed8
Refactor error handling for GuzzleException
...
- Refactored error handling to check for response in exception.
2024-06-03 19:48:39 +02:00
aa1ee0cc11
Update metric data retrieval configurations with additional details and proxy server setting.
2024-06-03 19:48:39 +02:00
48f121c759
Refactor metric configurations for HTTP requests
...
- Restructured config to include 'http' with url and data fields for each metric. Added metrics 3 and 4 with specific data outputs.
2024-06-03 19:48:39 +02:00
51ab7bcde6
Refactor HTTP request handling for response status check
...
- Added try-catch block to handle GuzzleException
- Updated logic to check for response status before processing
2024-06-03 19:48:39 +02:00
201c935330
Refactor HTTP request handling and data extraction
...
- Improved handling of HTTP requests and extraction of response data.
2024-06-03 19:48:39 +02:00
66933d7d19
Update URI check to include CLI request detection.
...
The code now checks if the request URI is '/metrics' or if the PHP script is running from the command line interface (CLI). This change allows for proper handling of CLI requests in addition to web requests.
2024-06-03 19:48:39 +02:00
7c61ead8ac
Refactor HTTP handling, update Guzzle requests and Twig config.
...
- Refactored HTTP handling to use nested arrays for options
- Updated Guzzle requests based on new array structure
- Adjusted Twig cache configuration in the code
2024-06-03 19:48:39 +02:00
638e6d9346
Refactor Guzzle HTTP requests for flexibility and proxy support
...
Restructured Guzzle HTTP requests to allow for additional options like proxy support, enhancing flexibility in handling different types of requests.
2024-06-03 19:48:39 +02:00
a726fa024c
Add handling for HTTP response time metric using GuzzleHttp.
2024-06-03 19:48:39 +02:00
d0fa8a6a99
Update handling of value assignment when 'jsonelem' is not set.
...
- Adjusted code to assign $output directly to 'value' if 'jsonelem' is not set.
2024-06-03 19:48:39 +02:00
7aef1769d9
Added readme and licence
2024-06-03 19:48:39 +02:00
418b170bc6
Added example configurion
2024-06-03 19:48:39 +02:00
5d76b42c23
Added the first code
2024-06-03 19:48:39 +02:00
6a9976f082
Initial commit
2024-06-03 19:48:39 +02:00