Update autodetect.sh to detect additional integrations in a generic way. (#191383)

## Summary
Relates: https://github.com/elastic/observability-dev/issues/3826

Update `detect_known_integrations()` in `auto_detect.sh` for generic detection using `integrations.conf` and added more integrations for auto detect.
This commit is contained in:
Richa Talwar 2024-09-17 14:25:57 +05:30 committed by GitHub
parent 73fa7a7d80
commit 9c3561d97f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 628 additions and 143 deletions

View file

@ -93,7 +93,22 @@ export const AutoDetectPanel: FunctionComponent = () => {
</EuiText>
<EuiSpacer size="s" />
<EuiFlexGroup gutterSize="s">
{['Apache', 'Docker', 'Nginx', 'System', 'Custom .log files'].map((item) => (
{[
'Apache',
'Docker',
'Nginx',
'System',
'MySQL',
'PostgreSQL',
'Redis',
'HAProxy',
'Kafka',
'RabbitMQ',
'Prometheus',
'Tomcat',
'MongoDB',
'Custom .log files',
].map((item) => (
<EuiFlexItem key={item} grow={false}>
<EuiBadge color="hollow">{item}</EuiBadge>
</EuiFlexItem>

View file

@ -19,6 +19,15 @@ export const DASHBOARDS = {
'docker-AV4REOpp5NkDleZmzKkE': { type: 'metrics' },
'nginx-55a9e6e0-a29e-11e7-928f-5dbe6f6f5519': { type: 'logs' },
'system-79ffd6e0-faa0-11e6-947f-177f697178b8': { type: 'metrics' },
'mysql-Logs-MySQL-Dashboard': { type: 'logs' },
'postgresql-158be870-87f4-11e7-ad9c-db80de0bf8d3': { type: 'logs' },
'redis-7fea2930-478e-11e7-b1f0-cb29bac6bf8b': { type: 'logs' },
'haproxy-3560d580-aa34-11e8-9c06-877f0445e3e0': { type: 'logs' },
'rabbitmq-AV4YobKIge1VCbKU_qVo': { type: 'metrics' },
'kafka-943caca0-87ee-11e7-ad9c-db80de0bf8d3': { type: 'logs' },
'apache_tomcat-8fd54a20-1f0d-11ee-9d6b-bb41d08322c8': { type: 'logs' },
'mongodb-abcf35b0-0a82-11e8-bffe-ff7d4f68cf94': { type: 'logs' },
'prometheus-c181a040-3d96-11ed-b624-b12467b8df74': { type: 'metrics' },
};
export function useOnboardingFlow() {

View file

@ -24,6 +24,14 @@ export type SupportedLogo =
| 'apache'
| 'system'
| 'opentelemetry'
| 'mysql'
| 'postgresql'
| 'redis'
| 'haproxy'
| 'rabbitmq'
| 'kafka'
| 'mongodb'
| 'apache_tomcat'
| 'firehose';
export function isSupportedLogo(logo: string): logo is SupportedLogo {
@ -41,6 +49,14 @@ export function isSupportedLogo(logo: string): logo is SupportedLogo {
'system',
'apache',
'opentelemetry',
'mysql',
'postgresql',
'redis',
'haproxy',
'rabbitmq',
'kafka',
'mongodb',
'apache_tomcat',
].includes(logo);
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="300px"
height="200px" viewBox="0 0 300 200" enable-background="new 0 0 300 200" xml:space="preserve">
<g id="Calque_3">
<g id="XMLID_1_">
<path fill="#D1A41A" d="M53.7299805,130c2.9599609,3.6503906,6.25,7.3496094,9.8701172,11.0693359
c-10.5400391,3.1708984-17.4501953,9.0605469-21.7602539,14.2607422
c-6.8198242,8.2304688-10.4296875,19.1005859-9.5996094,28.4296875H14.0898438
C17.7299805,175.8603516,32.2597656,153.0400391,53.7299805,130z"/>
<path fill="#D1A41A" d="M263.9902344,188.7099609h-22.0703125
c-50.6298828-26.4199219-95.0800781-45.0498047-142.2998047-49.1201172
c0.1000977-6.5703125,1.2700195-14.0097656,3.5200195-22.2998047l-4.3500977-1.1699219
c-2.3100586,8.5195313-3.5200195,16.2294922-3.6601563,23.1298828c-4.9199219-0.3300781-9.8701172-0.4902344-14.8701172-0.4902344
c-4.2299805,0-8.0898438,0.390625-11.6098633,1.0703125c-4.5898438-4.5800781-8.5-8.9599609-11.8198242-13.109375
c21.7797852-22.6806641,57.6499023-43.2011719,88.8701172-50.9208984
c8.7900391,29.2197266,27.6601563,49.2402344,50.5595703,62.7099609c1.6796875-0.9599609,3.3300781-1.9599609,4.9501953-3.0195313
L241.1601563,178.5l1.75-0.1503906c10.9091797-0.9394531,17.109375,4.9804688,18.75,6.8203125
C262.8701172,186.5097656,263.5898438,187.7402344,263.9902344,188.7099609z"/>
<path fill="#FFDC76" d="M244.5,44.8496094c0.8105469,39.6904297-19.4394531,71.2802734-47.7900391,87.4804688
c-48.1201172-23.9697266-57.1801758-84.7099609-48.9799805-117.2900391
C150.0097656,27.5,154.1601563,35.3105469,163.1201172,39.140625c19.5400391-5.5908203,46.4296875-6.03125,66.2402344-0.5703125
c8.25-6,11.4501953-15.1699219,13.2001953-23.1796875C244.7402344,24.7099609,244.4902344,44.8496094,244.5,44.8496094z"/>
</g>
</g>
<g id="Layer_1">
<polygon points="123.4584961,82.4277344 130.8007813,104.1835938 108.5014648,89.2265625 "/>
<polygon points="101.9750977,91.9462891 109.8613281,105.5429688 93.2729492,97.1132813 "/>
<polygon points="84.0268555,102.5517578 87.8339844,116.1494141 76.4125977,108.2626953 "/>
<polygon points="205.5849609,138.9921875 198.5146484,149.8701172 211.0234375,144.1591797 "/>
<polygon points="216.734375,151.5019531 205.3134766,160.2041016 221.0859375,156.125 "/>
<polygon points="188.9960938,33.4785156 197.4267578,51.9707031 202.8652344,33.2070313 "/>
<polygon points="146.3017578,60.4003906 159.6269531,67.4707031 147.6611328,68.2871094 "/>
<polygon points="149.5649414,74.8144531 157.7231445,78.0771484 150.9248047,79.9804688 "/>
<polygon points="244.7451172,65.5683594 233.8671875,70.1914063 242.8408203,71.5507813 "/>
<polygon points="240.3935547,78.8925781 231.9638672,81.3408203 238.7617188,83.7880859 "/>
</g>
<g id="Calque_4">
<rect x="141.9233398" y="99.3027344" width="26.2446289" height="3.2392578"/>
<rect x="141.9233398" y="91.5253906" width="26.2446289" height="3.2402344"/>
<rect x="222.0634766" y="99.3027344" width="26.2441406" height="3.2392578"/>
<rect x="222.0634766" y="91.5253906" width="26.2441406" height="3.2402344"/>
<g>
<path d="M212.8134766,72.3164063h-27.1875h-3.0205078h-12.5605469v-2.9160156h13.3095703
c1.6386719-7.0175781,1.9628906-13.7246094-0.0136719-17.125c-0.84375-1.4453125-2.0097656-2.1210938-3.6738281-2.1210938
c-7.609375,0-10.7529297,8.046875-10.8837891,8.3886719l0.0019531-0.0019531l-2.7304688-1.0244141
c0.15625-0.4199219,3.9648438-10.2783203,13.6123047-10.2783203c2.6923828,0,4.8339844,1.2363281,6.1914063,3.5703125
c2.4101563,4.140625,2.1269531,11.3046875,0.4941406,18.5917969h23.3544922
c3.1025391-9.1152344,9.5810547-13.4130859,20.4052734-13.4130859v2.9150391
c-11.7324219,0-15.0185547,4.9736328-17.3662109,10.4980469h12.7431641l-0.0292969,2.9013672L212.8134766,72.3164063z"/>
<path d="M214.7304688,86.7177734l0.0185547-0.0029297c-3.4589844-5.1005859-4.5546875-9.4550781-3.1083984-14.4130859
l-2.9707031,0.0146484c-1.0351563,3.3007813-0.6201172,8.2734375,1.9287109,12.5400391h-29.6748047
c1.8056641-3.6162109,3.4794922-8.0253906,4.7021484-12.5400391h-3.0205078
c-1.3476563,4.7871094-3.2412109,9.5244141-5.3720703,13.2773438l-0.6894531,1.2128906l16.6523438,10.4824219l-9.375,6.1777344
l1.6054688,2.4355469l10.4785156-6.9082031l11.3115234,7.3818359l1.5537109-2.4677734l-10.4882813-6.4882813
c0,0,15.6816406-10.1865234,16.4609375-10.6835938C214.7382813,86.7294922,214.7353516,86.7236328,214.7304688,86.7177734z
M195.8701172,95.5263672l-12.3173828-7.7548828l24.0712891,0.0058594L195.8701172,95.5263672z"/>
</g>
</g>
<g id="Calque_2">
<path d="M249.394043,41.3330078c-0.0185547-5.0703125-1.5976563-26.5-4.5-32.4003906
c-7.8691406,2.9902344-22.1894531,12.6796875-25.4306641,22.5878906
c-15.5322266-2.3193359-33.0419922-2.0449219-48.3808594,0.609375c-2.5625-10.6601563-15.4243164-18.8183594-25.1274414-23.4140625
c-4.0927734,6.90625-5.90625,22.9199219-5.4448242,34.2792969c-0.0175781,0.0117188-0.0366211,0.0234375-0.0541992,0.0361328
c1.7998047,47.7001953,25.199707,77.3994141,55.7993164,95.3994141
c31.4814453-17.9882813,53.9716797-53.0566406,53.1005859-97.1191406
C249.3686523,41.3193359,249.3823242,41.3251953,249.394043,41.3330078z M223.1977539,32.1367188
c0.1142578,0.0205078,0.2285156,0.0419922,0.34375,0.0634766
C223.4272461,32.1787109,223.3129883,32.1572266,223.1977539,32.1367188z M221.2397461,31.7988281
c0.2753906,0.0439453,0.5537109,0.09375,0.8300781,0.140625C221.793457,31.8925781,221.5170898,31.8447266,221.2397461,31.7988281z
M244.496582,44.7744141c0.8095703,39.6904297-19.4404297,71.2792969-47.7900391,87.4804688
c-48.1181641-23.9765625-57.1826172-84.7109375-48.9770508-117.2890625
c2.2827148,12.4550781,6.4243164,20.2666016,15.3935547,24.0986328c19.5327148-5.5908203,46.4233398-6.0322266,66.230957-0.5693359
c8.2548828-6.0019531,11.4560547-15.1699219,13.2041016-23.1796875
C244.7416992,24.6367188,244.4897461,44.7705078,244.496582,44.7744141z"/>
<path d="M265.0170898,182.0908203c-4.9414063-5.5283203-14.6230469-8.1445313-22.7070313-7.9511719
c-5.7382813-6.8300781-39.0039063-41.8613281-39.0039063-41.8613281l-2.3056641,2.9033203l40.1621094,43.2382813
l1.7431641-0.1494141c10.9121094-0.9345703,17.1152344,4.9833984,18.7568359,6.8193359
c1.2041016,1.3466797,1.9306641,2.5751953,2.3261719,3.5390625h-22.0751953
c-50.6240234-26.4160156-95.078125-45.0439453-142.2973633-49.1123047
c0.1035156-6.5712891,1.2734375-14.0097656,3.5180664-22.2988281l-4.3432617-1.1767578
c-2.3076172,8.5205078-3.5234375,16.2363281-3.6606445,23.1328125c-4.9199219-0.3261719-9.8720703-0.4951172-14.8676758-0.4951172
c-4.2368164,0-8.0952148,0.3935547-11.6142578,1.0771484c-4.5898438-4.5869141-8.5-8.9589844-11.8227539-13.1083984
c21.9360352-22.8496094,58.1499023-43.4980469,89.5332031-51.0917969l-1.0151367-4.3964844
c-33.7919922,8.1484375-70.7797852,30.3349609-91.390625,51.7617188
c-9.5649414-12.9101563-13.3598633-23.5039063-14.4868164-31.5322266
c-1.4238281-10.1396484,0.996582-19.4414063,6.9990234-26.8994141c9.3969727-11.6738281,22.7490234-12.4960938,36.4770508-10.1875
c-0.2680664,2.1679688,0.0170898,4.2402344,0.8852539,5.5224609c3.6308594,5.3623047,23.1435547,7.2460938,34.7910156,2.0498047
c-8.5952148-12.0449219-26.0058594-17.9257813-30.8300781-15.5693359
c-1.5981445,0.7802734-2.8037109,2.2138672-3.6298828,3.8857422c-4.7451172-0.8486328-9.4580078-1.4804688-12.902832-1.4550781
c-12.1074219,0.0888672-21.3632813,4.3193359-28.2958984,12.9326172
c-6.8017578,8.4501953-9.5507813,18.9443359-7.9501953,30.3466797
c1.5161133,10.7998047,6.8632813,22.2861328,15.8251953,34.1982422c-1.4887695,1.5966797-2.9277344,3.1738281-4.3125,4.7226563
c-21.8432617,24.4414063-37.8100586,50.6503906-37.8100586,54.9931641v2.25h28.815918l-0.5048828-2.6679688
c-1.6274414-8.6005859,1.6225586-19.3505859,8.2792969-27.3847656
c4.1791992-5.0439453,11.0996094-10.8007813,21.9677734-13.4570313
c9.6630859,9.4306641,21.9746094,19.4462891,35.6787109,29.109375h21.4135742v-2.25
c0-2.5390625-1.2587891-4.7617188-3.5449219-6.2568359c-3.3828125-2.2119141-8.6049805-2.5166016-13.4018555-0.8808594
c-4.5732422-5.0927734-7.137207-11.8964844-7.690918-20.3466797
c46.4741211,4.1152344,90.9267578,22.8828125,141.0849609,49.0849609h27.5976563l0.3613281-1.8085938
C269.284668,188.7451172,267.8813477,185.2949219,265.0170898,182.0908203z M41.8378906,155.2548828
c-6.815918,8.2265625-10.4287109,19.09375-9.6010742,28.4238281h-18.152832
c3.6474609-7.8935547,18.1762695-30.7119141,39.6435547-53.7597656c2.9580078,3.65625,6.2529297,7.3496094,9.8720703,11.0732422
C53.0595703,144.1601563,46.1494141,150.0517578,41.8378906,155.2548828z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

@ -10,15 +10,15 @@ if [ -z "${BASH_VERSION:-}" ]; then
fi
if ! command -v curl >/dev/null 2>&1; then
fail "curl is required to run this script"
fail "curl is required to run this script"
fi
# Check if the `lsof` command exists in PATH, if not use `/usr/sbin/lsof` if possible
LSOF_PATH=""
if command -v lsof >/dev/null 2>&1; then
LSOF_PATH=$(command -v lsof)
LSOF_PATH=$(command -v lsof)
elif command -v /usr/sbin/lsof >/dev/null 2>&1; then
LSOF_PATH="/usr/sbin/lsof"
LSOF_PATH="/usr/sbin/lsof"
fi
install_api_key_encoded=""
@ -28,60 +28,60 @@ onboarding_flow_id=""
elastic_agent_version=""
help() {
echo "Usage: sudo ./auto-detect.sh <arguments>"
echo ""
echo "Arguments:"
echo " --install-key=<value> Base64 Encoded API key that has priviledges to install integrations."
echo " --ingest-key=<value> Base64 Encoded API key that has priviledges to ingest data."
echo " --kibana-url=<value> Kibana API endpoint."
echo " --id=<value> Onboarding flow ID."
echo " --ea-version=<value> Elastic Agent version."
exit 1
echo "Usage: sudo ./auto-detect.sh <arguments>"
echo ""
echo "Arguments:"
echo " --install-key=<value> Base64 Encoded API key that has priviledges to install integrations."
echo " --ingest-key=<value> Base64 Encoded API key that has priviledges to ingest data."
echo " --kibana-url=<value> Kibana API endpoint."
echo " --id=<value> Onboarding flow ID."
echo " --ea-version=<value> Elastic Agent version."
exit 1
}
ensure_argument() {
if [ -z "$1" ]; then
echo "Error: Missing value for $2."
help
fi
if [ -z "$1" ]; then
echo "Error: Missing value for $2."
help
fi
}
if [ "$EUID" -ne 0 ]; then
echo "Error: This script must be run as root."
help
echo "Error: This script must be run as root."
help
fi
# Parse command line arguments
for i in "$@"; do
case $i in
--install-key=*)
shift
install_api_key_encoded="${i#*=}"
;;
--ingest-key=*)
shift
ingest_api_key_encoded="${i#*=}"
;;
--kibana-url=*)
shift
kibana_api_endpoint="${i#*=}"
;;
--id=*)
shift
onboarding_flow_id="${i#*=}"
;;
--ea-version=*)
shift
elastic_agent_version="${i#*=}"
;;
--help)
help
;;
*)
echo "Unknown option: $i"
help
;;
esac
case $i in
--install-key=*)
shift
install_api_key_encoded="${i#*=}"
;;
--ingest-key=*)
shift
ingest_api_key_encoded="${i#*=}"
;;
--kibana-url=*)
shift
kibana_api_endpoint="${i#*=}"
;;
--id=*)
shift
onboarding_flow_id="${i#*=}"
;;
--ea-version=*)
shift
elastic_agent_version="${i#*=}"
;;
--help)
help
;;
*)
echo "Unknown option: $i"
help
;;
esac
done
ensure_argument "$install_api_key_encoded" "--install-key"
@ -92,6 +92,7 @@ ensure_argument "$elastic_agent_version" "--ea-version"
known_integrations_list_string=""
selected_known_integrations_array=()
detected_patterns=()
selected_known_integrations_tsv_string=""
unknown_log_file_path_list_string=""
unknown_log_file_pattern_list_string=""
@ -102,6 +103,8 @@ custom_log_file_path_list_tsv_string=""
elastic_agent_artifact_name=""
elastic_agent_config_path="/opt/Elastic/Agent/elastic-agent.yml"
elastic_agent_tmp_config_path="/tmp/elastic-agent-config.tar"
integration_names=()
integration_titles=()
OS="$(uname)"
ARCH="$(uname -m)"
@ -173,7 +176,7 @@ extract_elastic_agent() {
}
install_elastic_agent() {
"./${elastic_agent_artifact_name}/elastic-agent" install -f -n > /dev/null
"./${elastic_agent_artifact_name}/elastic-agent" install -f -n >/dev/null
if [ "$?" -eq 0 ]; then
printf "\e[1;32m✓\e[0m %s\n" "Elastic Agent installed to $(dirname "$elastic_agent_config_path")"
@ -187,11 +190,11 @@ install_elastic_agent() {
wait_for_elastic_agent_status() {
local MAX_RETRIES=10
local i=0
elastic-agent status > /dev/null 2>&1
elastic-agent status >/dev/null 2>&1
local ELASTIC_AGENT_STATUS_EXIT_CODE="$?"
while [ "$ELASTIC_AGENT_STATUS_EXIT_CODE" -ne 0 ] && [ $i -le $MAX_RETRIES ]; do
sleep 1
elastic-agent status > /dev/null 2>&1
elastic-agent status >/dev/null 2>&1
ELASTIC_AGENT_STATUS_EXIT_CODE="$?"
((i++))
done
@ -221,7 +224,7 @@ ensure_elastic_agent_healthy() {
backup_elastic_agent_config() {
if [ -f "$elastic_agent_config_path" ]; then
echo -e "\nExisting config found at $elastic_agent_config_path";
echo -e "\nExisting config found at $elastic_agent_config_path"
printf "\n\e[1;36m?\e[0m \e[1m%s\e[0m \e[2m%s\e[0m" "Create backup and continue installation?" "[Y/n] (default: Yes): "
read confirmation_reply
@ -286,13 +289,13 @@ apply_elastic_agent_config() {
local decoded_ingest_api_key=$(echo "$ingest_api_key_encoded" | base64 -d)
# Verify that the downloaded archive contains the expected `elastic-agent.yml` file
tar --list --file "$elastic_agent_tmp_config_path" --include 'elastic-agent.yml' > /dev/null && \
# Remove existing config file including `inputs.d` directory
rm -rf "$elastic_agent_config_path" "$(dirname "$elastic_agent_config_path")/inputs.d" && \
# Extract new config files from downloaded archive
tar --extract --file "$elastic_agent_tmp_config_path" --include 'elastic-agent.yml' --include 'inputs.d/*.yml' --directory "$(dirname "$elastic_agent_config_path")" && \
# Replace placeholder with the Ingest API key
sed -i '' "s/\${API_KEY}/$decoded_ingest_api_key/" "$elastic_agent_config_path"
tar --list --file "$elastic_agent_tmp_config_path" --include 'elastic-agent.yml' >/dev/null &&
# Remove existing config file including `inputs.d` directory
rm -rf "$elastic_agent_config_path" "$(dirname "$elastic_agent_config_path")/inputs.d" &&
# Extract new config files from downloaded archive
tar --extract --file "$elastic_agent_tmp_config_path" --include 'elastic-agent.yml' --include 'inputs.d/*.yml' --directory "$(dirname "$elastic_agent_config_path")" &&
# Replace placeholder with the Ingest API key
sed -i '' "s/\${API_KEY}/$decoded_ingest_api_key/" "$elastic_agent_config_path"
if [ "$?" -eq 0 ]; then
printf "\e[1;32m✓\e[0m %s\n" "Config written to:"
tar --list --file "$elastic_agent_tmp_config_path" --include 'elastic-agent.yml' --include 'inputs.d/*.yml' | while read -r file; do
@ -313,30 +316,29 @@ read_open_log_file_list() {
"^\/Users\/.+?\/Library\/Containers"
"^\/Users\/.+?\/Library\/Caches"
"^\/private"
# Excluding all patterns that correspond to known integrations
# that we are detecting separately
"^\/var\/log\/nginx"
"^\/var\/log\/apache2"
"^\/var\/log\/httpd"
"^\/var\/lib\/docker\/containers"
"^\/var\/log\/syslog"
"^\/var\/log\/auth.log"
"^\/var\/log\/system.log"
"^\/var\/log\/messages"
"^\/var\/log\/secure"
# Exclude previous installation logs
"\/opt\/Elastic\/Agent\/"
"\/Library\/Elastic\/Agent\/"
)
# Excluding all patterns that correspond to known integrations
# that we are detecting separately
for pattern in "${detected_patterns[@]}"; do
exclude_patterns+=("$pattern")
done
local list=$("$LSOF_PATH" -Fn / | grep "^n.*\.log$" | cut -c2- | sort -u)
# Filtering by the exclude patterns
while IFS= read -r line; do
if ! grep -qE "$(IFS="|"; echo "${exclude_patterns[*]}")" <<< "$line"; then
unknown_log_file_path_list_string+="$line\n"
if ! grep -qE "$(
IFS="|"
echo "${exclude_patterns[*]}"
)" <<<"$line"; then
unknown_log_file_path_list_string+="$line\n"
fi
done <<< "$list"
done <<<"$list"
}
detect_known_integrations() {
@ -344,60 +346,82 @@ detect_known_integrations() {
# Even when there is no system logs on the host,
# System integration will still be able to to collect metrics.
known_integrations_list_string+="system"$'\n'
integrations_config_url="${kibana_api_endpoint}/plugins/observabilityOnboarding/assets/integrations.conf"
local nginx_patterns=(
"/var/log/nginx/access.log*"
"/var/log/nginx/error.log*"
)
integrations_config=$(curl "${integrations_config_url}" --silent --fail)
local integration=""
local patterns=()
for pattern in "${nginx_patterns[@]}"; do
if compgen -G "$pattern" > /dev/null; then
known_integrations_list_string+="nginx"$'\n'
break
# Debug: Check if the config file exists
if [[ -z "$integrations_config" ]]; then
echo "Failed to retrieve config file"
exit 1
fi
while IFS= read -r line; do
# Skip comments and empty lines
if [[ $line =~ ^\s*# || -z $line ]]; then
continue
fi
done
local apache_patterns=(
"/var/log/apache2/access.log*"
"/var/log/apache2/other_vhosts_access.log*"
"/var/log/apache2/error.log*"
"/var/log/httpd/access_log*"
"/var/log/httpd/error_log*"
)
# Process section headers
if [[ $line =~ ^\[([a-zA-Z0-9_]+)\] ]]; then
# If we were processing a previous section, check patterns for the previous integration
if [[ -n "$integration" && ${#patterns[@]} -gt 0 ]]; then
for pattern in "${patterns[@]}"; do
pattern=$(echo "$pattern" | xargs) # Trim leading/trailing spaces
if compgen -G "$pattern" >/dev/null; then
known_integrations_list_string+="$integration"$'\n'
detected_patterns+=("${patterns[@]}")
break
fi
done
fi
for pattern in "${apache_patterns[@]}"; do
if compgen -G "$pattern" > /dev/null; then
known_integrations_list_string+="apache"$'\n'
break
# Start a new section
integration="${BASH_REMATCH[1]}"
patterns=()
continue
fi
done
if [ -S /var/run/docker.sock ]; then
known_integrations_list_string+="docker"$'\n'
elif compgen -G "/var/lib/docker/containers/*/*-json.log" > /dev/null; then
known_integrations_list_string+="docker"$'\n'
# Process patterns
if [[ $line =~ ^patterns= ]]; then
# Capture patterns by trimming spaces and handling multi-line patterns
IFS=$'\n' read -r -d '' -a patterns <<<"${line#patterns=}"
patterns=($(echo "${patterns[@]}" | xargs)) # Trim leading/trailing spaces
elif [[ $line =~ ^title=.*$ ]]; then
# Capture titles
integration_titles+=("${line#title=}")
integration_names+=("$integration")
elif [[ -n "$integration" && -n "$line" ]]; then
# Capture multi-line patterns if not directly following "patterns="
patterns+=("$(echo "$line" | xargs)") # Trim leading/trailing spaces
fi
done <<< "$integrations_config"
# Check patterns for the last section
if [[ -n "$integration" && ${#patterns[@]} -gt 0 ]]; then
for pattern in "${patterns[@]}"; do
pattern=$(echo "$pattern" | xargs) # Trim leading/trailing spaces
if compgen -G "$pattern" >/dev/null; then
known_integrations_list_string+="$integration"$'\n'
detected_patterns+=("${patterns[@]}")
break
fi
done
fi
}
known_integration_title() {
local integration=$1
case $integration in
"nginx")
echo "Nginx Logs"
;;
"apache")
echo "Apache Logs"
;;
"docker")
echo "Docker Container Logs"
;;
"system")
echo "System Logs And Metrics"
;;
*)
echo "Unknown"
;;
esac
for i in "${!integration_names[@]}"; do
if [[ "${integration_names[$i]}" == "$integration" ]]; then
echo "${integration_titles[$i]}"
return
fi
done
echo "Unknown"
}
build_unknown_log_file_patterns() {
@ -407,7 +431,7 @@ build_unknown_log_file_patterns() {
fi
unknown_log_file_pattern_list_string+="$(dirname "$log_file_path")/*.log\n"
done <<< "$(echo -e "$unknown_log_file_path_list_string")"
done <<<"$(echo -e "$unknown_log_file_path_list_string")"
unknown_log_file_pattern_list_string=$(echo -e "$unknown_log_file_pattern_list_string" | sort -u)
}
@ -421,14 +445,14 @@ function select_list() {
continue
fi
known_integrations_options+=("$line")
done <<< "$known_integrations_list_string"
done <<<"$known_integrations_list_string"
while IFS= read -r line; do
if [[ -z "$line" ]]; then
continue
fi
unknown_logs_options+=("$line")
done <<< "$unknown_log_file_pattern_list_string"
done <<<"$unknown_log_file_pattern_list_string"
local options=("${known_integrations_options[@]}" "${unknown_logs_options[@]}")
@ -448,13 +472,13 @@ function select_list() {
printf "\n\e[1;36m?\e[0m \e[1m%s\e[0m \e[2m%s\e[0m\n" "Exclude logs by listing their index numbers" "(e.g. 1, 2, 3). Press Enter to skip."
read exclude_index_list_string
IFS=', ' read -r -a exclude_index_list_array <<< "$exclude_index_list_string"
IFS=', ' read -r -a exclude_index_list_array <<<"$exclude_index_list_string"
for index in "${!options[@]}"; do
local is_excluded=0
for excluded_index in "${exclude_index_list_array[@]}"; do
if [[ "$index" -eq "$((excluded_index - 1))" ]]; then
is_excluded=1
is_excluded=1
fi
done
@ -481,7 +505,7 @@ function select_list() {
printf "\e[1;36m?\e[0m \e[1m%s\e[0m \e[2m%s\e[0m\n" "List any additional logs you'd like to ingest" "(e.g. /path1/*.log, /path2/*.log). Press Enter to skip."
read custom_log_file_path_list_string
IFS=', ' read -r -a custom_log_file_path_list_array <<< "$custom_log_file_path_list_string"
IFS=', ' read -r -a custom_log_file_path_list_array <<<"$custom_log_file_path_list_string"
echo -e "\nYou've selected these logs for ingestion:"
for item in "${selected_known_integrations_array[@]}"; do
@ -506,30 +530,30 @@ function select_list() {
}
generate_custom_integration_name() {
local path_pattern="$1"
local dir_path
local name_parts=()
local name
local path_pattern="$1"
local dir_path
local name_parts=()
local name
dir_path=$(dirname "$path_pattern")
IFS='/' read -r -a dir_array <<< "$dir_path"
dir_path=$(dirname "$path_pattern")
IFS='/' read -r -a dir_array <<<"$dir_path"
# Get the last up to 4 parts of the path
for (( i=${#dir_array[@]}-1, count=0; i>=0 && count<4; i--, count++ )); do
name_parts=("${dir_array[$i]}" "${name_parts[@]}")
done
# Get the last up to 4 parts of the path
for ((i = ${#dir_array[@]} - 1, count = 0; i >= 0 && count < 4; i--, count++)); do
name_parts=("${dir_array[$i]}" "${name_parts[@]}")
done
# Join the parts into a single string with underscores
name=$(printf "%s_" "${name_parts[@]}")
name="${name#_}" # Remove leading underscore
name="${name%_}" # Remove trailing underscore
# Join the parts into a single string with underscores
name=$(printf "%s_" "${name_parts[@]}")
name="${name#_}" # Remove leading underscore
name="${name%_}" # Remove trailing underscore
# Replace special characters with underscores
name="${name// /_}"
name="${name//-/_}"
name="${name//./_}"
# Replace special characters with underscores
name="${name// /_}"
name="${name//-/_}"
name="${name//./_}"
echo "$name"
echo "$name"
}
printf "\e[1m%s\e[0m\n" "Looking for log files..."
@ -538,10 +562,10 @@ detect_known_integrations
# Check if LSOF_PATH is executable
if [ -x "$LSOF_PATH" ]; then
read_open_log_file_list
build_unknown_log_file_patterns
read_open_log_file_list
build_unknown_log_file_patterns
else
echo -e "\nlsof is required to detect custom log files. Looking for known integrations only."
echo -e "\nlsof is required to detect custom log files. Looking for known integrations only."
fi
update_step_progress "logs-detect" "complete"

View file

@ -0,0 +1,197 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M16.0503 13.2373L12.9399 9.62524" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M6.11719 10.5283L8.62555 14.04" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M16.0498 13.2373L19.1602 9.62524" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M19.8628 17.1504L23.5752 14.04" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M19.8628 17.1504L23.5752 20.4614" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M19.1602 24.5752L16.0498 21.0635" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M12.9399 24.5752L16.0503 21.0635" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M8.62549 20.2608L12.1372 17.1504" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M8.62549 14.04L12.1372 17.1504" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M16.0502 13.2375L8.62549 14.0402" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M16.0498 13.2375L23.5749 14.0402" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M19.863 17.1503L19.1606 9.62524" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M19.863 17.1504L19.1606 24.5751" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M23.5749 20.4614L16.0498 21.0634" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M8.62549 20.261L16.0502 21.0637" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M12.9399 24.5751L12.1372 17.1504" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M12.9399 9.62524L12.1372 17.1503" stroke="#05486D" stroke-width="0.12" stroke-miterlimit="10"/>
<path d="M5.11377 15.0434L8.62548 14.04" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M9.32764 7.11719L12.9397 9.62555" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M13.7426 5.51172L12.9399 9.62543" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M13.7427 5.51172L19.1607 9.62543" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M18.3579 5.51172L19.1606 9.62543" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M22.7727 7.11719L19.1606 9.62555" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M25.9834 10.5283L19.1606 9.62524" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 14.04L25.9832 10.5283" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 14.04L26.9866 15.0434" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 14.04L26.9866 19.2574" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M18.358 5.51172L12.9399 9.62543" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5756 14.0403L22.7729 7.11719" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 20.4616L26.9866 19.2576" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 20.4615L26.9866 15.0435" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5752 20.4614L25.9832 23.7725" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M23.5756 20.4614L22.7729 27.1838" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M19.1606 24.5752L22.7727 27.1839" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M19.1606 24.5751L25.9834 23.7725" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M19.1606 24.5752L18.3579 28.7892" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M19.1607 24.5752L13.7427 28.7892" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M12.9399 24.5752L13.7426 28.7892" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M12.9399 24.5752L18.358 28.7892" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M12.9397 24.5752L9.32764 27.1839" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M12.9399 24.5751L6.11719 23.7725" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M8.62555 20.261L6.11719 23.7727" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M8.62549 20.261L9.32783 27.1841" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M8.62548 20.2609L5.11377 19.2576" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M8.62548 14.04L5.11377 19.2574" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M8.62548 20.2608L5.11377 15.0435" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M9.32783 7.11719L8.62549 14.0403" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M6.11719 10.5283L12.9399 9.62524" stroke="#05486D" stroke-width="0.06" stroke-miterlimit="10"/>
<path d="M9.32744 7.11709L6.71875 5.81274" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32762 7.11697L9.12695 4.20728" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7423 5.51162L9.12695 4.20728" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7425 5.51178L11.7358 3.00342" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7427 5.51175L14.5454 2.60205" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32764 7.11713L11.7357 3.00342" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3576 5.51175L14.5449 2.60205" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 5.51174L17.5552 2.50171" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7427 5.51174L17.5554 2.50171" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 5.51178L20.3646 3.00342" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7728 7.11713L20.3647 3.00342" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7729 7.11697L23.074 4.20728" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 5.51162L23.0736 4.20728" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7729 7.11708L25.482 5.7124" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7729 7.11719L27.4887 7.81953" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 10.5284L27.4884 7.81934" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9836 10.5285L25.4819 5.7124" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 10.5285L29.0938 10.2275" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 10.5283L30.1974 12.836" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 15.0436L29.0938 10.2275" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 15.0433L30.1975 12.8359" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 15.0435L30.5989 15.7458" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 19.2576L30.5989 15.7458" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 19.2575L30.6992 18.5552" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 15.0435L30.6992 18.5552" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 19.2576L30.0972 21.3646" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 23.7725L30.0971 21.3645" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 23.7725L29.0938 24.0735" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M26.9868 19.2576L29.0938 24.0736" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9834 23.7725L27.4884 26.4815" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.9836 23.7725L25.4819 28.4882" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M25.482 28.4882L22.7729 27.1838" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7729 27.1838L22.9736 30.0935" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7729 27.1838L27.4887 26.4814" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M22.7728 27.1838L20.3647 31.2976" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 28.7893L20.3646 31.2977" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 28.7893L22.9733 30.0937" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3579 28.7893L17.5552 31.7993" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M18.3576 28.7893L14.5449 31.7993" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7427 28.7893L14.5454 31.7993" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7427 28.7893L17.5554 31.7993" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7425 28.7893L11.7358 31.2977" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32764 27.1838L11.7357 31.2976" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.7423 28.7893L9.12695 30.194" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32762 27.1838L9.12695 30.1939" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32768 27.1838L6.61865 28.5885" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11719 23.7725L6.61886 28.5885" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32802 27.1838L4.6123 26.4814" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11732 23.7725L4.6123 26.4815" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.1172 23.7725L3.00684 24.0735" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11737 23.7725L1.90332 21.3645" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11402 19.2576L1.90332 21.3646" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11374 19.2575L1.40137 18.5552" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11386 19.2576L3.00684 24.0736" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11374 15.0435L1.40137 18.5552" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11374 19.2576L1.40137 15.7458" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11379 15.0435L2.00342 12.9365" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11374 15.0435L1.40137 15.7458" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M5.11411 15.0436L3.10742 10.2275" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11746 10.5285L3.10742 10.2275" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11713 10.5283L2.00342 12.9363" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11708 10.5284L4.7124 7.91968" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M6.11719 10.5285L6.71919 5.81274" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M9.32779 7.11719L4.7124 7.91987" stroke="#083D5F" stroke-width="0.05" stroke-miterlimit="10"/>
<path d="M13.9431 15.2441H10.3311V18.8361H13.9431V15.2441Z" fill="#006DA8"/>
<path d="M17.7561 11.3311H14.144V14.923H17.7561V11.3311Z" fill="#006DA8"/>
<path d="M17.7561 19.1572H14.144V22.7492H17.7561V19.1572Z" fill="#006DA8"/>
<path d="M21.6687 15.2441H18.0566V18.8361H21.6687V15.2441Z" fill="#006DA8"/>
<path d="M20.3648 8.42139H17.8564V10.8996H20.3648V8.42139Z" fill="#2F77BC"/>
<path d="M14.1436 8.32104H11.6353V10.7993H14.1436V8.32104Z" fill="#2F77BC"/>
<path d="M9.82965 12.8359H7.32129V15.3142H9.82965V12.8359Z" fill="#2F77BC"/>
<path d="M9.82965 18.9565H7.32129V21.4348H9.82965V18.9565Z" fill="#2F77BC"/>
<path d="M24.6788 18.9565H22.1704V21.4348H24.6788V18.9565Z" fill="#2F77BC"/>
<path d="M24.6788 12.7356H22.1704V15.2139H24.6788V12.7356Z" fill="#2F77BC"/>
<path d="M6.9198 9.62524H5.31445V11.3008H6.9198V9.62524Z" fill="#139BD7"/>
<path d="M10.1307 6.21387H8.52539V7.88945H10.1307V6.21387Z" fill="#139BD7"/>
<path d="M14.4447 4.60864H12.8394V6.28423H14.4447V4.60864Z" fill="#139BD7"/>
<path d="M5.91639 14.1404H4.31104V15.816H5.91639V14.1404Z" fill="#139BD7"/>
<path d="M26.7858 9.82617H25.0801V11.4717H26.7858V9.82617Z" fill="#139BD7"/>
<path d="M23.5753 6.41479H21.8696V8.06028H23.5753V6.41479Z" fill="#139BD7"/>
<path d="M19.2609 4.80933H17.5552V6.45481H19.2609V4.80933Z" fill="#139BD7"/>
<path d="M27.6888 14.4414H26.0835V16.0869H27.6888V14.4414Z" fill="#139BD7"/>
<path d="M14.1436 23.2708H11.6353V25.749H14.1436V23.2708Z" fill="#2F77BC"/>
<path d="M20.2642 23.2708H17.7559V25.749H20.2642V23.2708Z" fill="#2F77BC"/>
<path d="M26.6854 22.7693H25.0801V24.4449H26.6854V22.7693Z" fill="#139BD7"/>
<path d="M23.3749 26.0803H21.7695V27.7559H23.3749V26.0803Z" fill="#139BD7"/>
<path d="M19.0604 27.6855H17.4551V29.3611H19.0604V27.6855Z" fill="#139BD7"/>
<path d="M27.5887 18.2542H25.9834V19.9297H27.5887V18.2542Z" fill="#139BD7"/>
<path d="M6.91955 22.97H5.21387V24.6155H6.91955V22.97Z" fill="#139BD7"/>
<path d="M10.0304 26.3813H8.32471V28.0268H10.0304V26.3813Z" fill="#139BD7"/>
<path d="M14.4449 27.9868H12.7393V29.6323H14.4449V27.9868Z" fill="#139BD7"/>
<path d="M5.8158 18.3545H4.21045V20H5.8158V18.3545Z" fill="#139BD7"/>
<path d="M7.1203 5.31104H6.21729V6.24415H7.1203V5.31104Z" fill="#03A9DA"/>
<path d="M1.90301 15.2441H1V16.1773H1.90301V15.2441Z" fill="#03A9DA"/>
<path d="M25.7824 5.21069H24.8794V6.1438H25.7824V5.21069Z" fill="#03A9DA"/>
<path d="M2.50506 12.3345H1.60205V13.2676H2.50506V12.3345Z" fill="#03A9DA"/>
<path d="M12.1374 2.50171H11.2344V3.43482H12.1374V2.50171Z" fill="#03A9DA"/>
<path d="M3.50848 9.72583H2.60547V10.6589H3.50848V9.72583Z" fill="#03A9DA"/>
<path d="M5.11346 7.31763H4.21045V8.25074H5.11346V7.31763Z" fill="#03A9DA"/>
<path d="M9.6286 3.80615H8.72559V4.70916H9.6286V3.80615Z" fill="#03A9DA"/>
<path d="M15.0471 2.10034H14.144V3.00335H15.0471V2.10034Z" fill="#03A9DA"/>
<path d="M23.3742 3.60522H22.4712V4.53834H23.3742V3.60522Z" fill="#03A9DA"/>
<path d="M29.2946 9.72583H28.3916V10.6589H29.2946V9.72583Z" fill="#03A9DA"/>
<path d="M30.4982 12.3345H29.5952V13.2676H30.4982V12.3345Z" fill="#03A9DA"/>
<path d="M27.6891 7.31763H26.7861V8.25074H27.6891V7.31763Z" fill="#03A9DA"/>
<path d="M30.8996 15.1438H29.9966V16.0769H30.8996V15.1438Z" fill="#03A9DA"/>
<path d="M17.8561 2H16.9531V2.93311H17.8561V2Z" fill="#03A9DA"/>
<path d="M20.6652 2.60205H19.7622V3.53516H20.6652V2.60205Z" fill="#03A9DA"/>
<path d="M7.1203 5.31104H6.21729V6.24415H7.1203V5.31104Z" fill="#03A9DA"/>
<path d="M1.90301 15.2441H1V16.1773H1.90301V15.2441Z" fill="#03A9DA"/>
<path d="M25.7824 5.21069H24.8794V6.1438H25.7824V5.21069Z" fill="#03A9DA"/>
<path d="M2.50506 12.3345H1.60205V13.2676H2.50506V12.3345Z" fill="#03A9DA"/>
<path d="M12.1374 2.50171H11.2344V3.43482H12.1374V2.50171Z" fill="#03A9DA"/>
<path d="M3.50848 9.72583H2.60547V10.6589H3.50848V9.72583Z" fill="#03A9DA"/>
<path d="M5.11346 7.31763H4.21045V8.25074H5.11346V7.31763Z" fill="#03A9DA"/>
<path d="M9.6286 3.80615H8.72559V4.70916H9.6286V3.80615Z" fill="#03A9DA"/>
<path d="M15.0471 2.10034H14.144V3.00335H15.0471V2.10034Z" fill="#03A9DA"/>
<path d="M23.3742 3.60522H22.4712V4.53834H23.3742V3.60522Z" fill="#03A9DA"/>
<path d="M29.2946 9.72583H28.3916V10.6589H29.2946V9.72583Z" fill="#03A9DA"/>
<path d="M30.4982 12.3345H29.5952V13.2676H30.4982V12.3345Z" fill="#03A9DA"/>
<path d="M27.6891 7.31763H26.7861V8.25074H27.6891V7.31763Z" fill="#03A9DA"/>
<path d="M30.8996 15.1438H29.9966V16.0769H30.8996V15.1438Z" fill="#03A9DA"/>
<path d="M17.8561 2H16.9531V2.93311H17.8561V2Z" fill="#03A9DA"/>
<path d="M20.6652 2.60205H19.7622V3.53516H20.6652V2.60205Z" fill="#03A9DA"/>
<path d="M25.6823 27.8862H24.7793V28.8193H25.6823V27.8862Z" fill="#03A9DA"/>
<path d="M31.0002 17.9531H30.0972V18.8862H31.0002V17.9531Z" fill="#03A9DA"/>
<path d="M7.1203 27.9868H6.21729V28.9199H7.1203V27.9868Z" fill="#03A9DA"/>
<path d="M30.3981 20.7627H29.4951V21.6958H30.3981V20.7627Z" fill="#03A9DA"/>
<path d="M20.6652 30.5955H19.7622V31.5286H20.6652V30.5955Z" fill="#03A9DA"/>
<path d="M29.2946 23.3711H28.3916V24.3042H29.2946V23.3711Z" fill="#03A9DA"/>
<path d="M27.6891 25.7793H26.7861V26.7124H27.6891V25.7793Z" fill="#03A9DA"/>
<path d="M23.2741 29.7925H22.3711V30.6955H23.2741V29.7925Z" fill="#03A9DA"/>
<path d="M17.756 31.4983H16.853V32.4013H17.756V31.4983Z" fill="#03A9DA"/>
<path d="M9.4284 29.4917H8.52539V30.4248H9.4284V29.4917Z" fill="#03A9DA"/>
<path d="M3.50848 23.4717H2.60547V24.4048H3.50848V23.4717Z" fill="#03A9DA"/>
<path d="M2.30438 20.863H1.40137V21.7961H2.30438V20.863Z" fill="#03A9DA"/>
<path d="M5.01336 25.8796H4.11035V26.8127H5.01336V25.8796Z" fill="#03A9DA"/>
<path d="M1.90301 17.9531H1V18.8862H1.90301V17.9531Z" fill="#03A9DA"/>
<path d="M14.9465 31.4983H14.0435V32.4314H14.9465V31.4983Z" fill="#03A9DA"/>
<path d="M12.1374 30.5955H11.2344V31.5286H12.1374V30.5955Z" fill="#03A9DA"/>
</g>
<defs>
<clipPath id="clip0">
<path d="M0 0H32V32H0V0Z" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,86 @@
[system]
title=System Logs And Metrics
[nginx]
title=Nginx Logs
patterns=
/var/log/nginx/access.log*
/var/log/nginx/error.log*
[apache]
title=Apache Logs
patterns=
/var/log/apache2/access.log*
/var/log/apache2/other_vhosts_access.log*
/var/log/apache2/error.log*
/var/log/httpd/access_log*
/var/log/httpd/error_log*
[docker]
title=Docker Container Logs
patterns=
/var/lib/docker/containers/*/*-json.log
/var/run/docker.sock
[mysql]
title=MySQL Logs
patterns=
/var/log/mysql/*error.log*
/var/log/mysqld.log*
/var/log/mysql/*-slow.log*
/var/lib/mysql/*-slow.log*
[postgresql]
title=PostgreSQL Logs
patterns=
/var/log/postgresql/postgresql-*-*.log*
/*/postgresql-logs/*.log
/etc/postgresql/*/main/postgresql.conf
/var/log/postgresql/postgresql-*-*.csv*
[redis]
title=Redis Logs
patterns=
/var/log/redis/redis-server.log*
/etc/redis/redis.conf
[haproxy]
title=HAProxy Logs
patterns=
/var/log/haproxy.log
/etc/haproxy/haproxy.cfg
[rabbitmq]
title=RabbitMQ Logs
patterns=
/var/log/rabbitmq/rabbit@*.log
/etc/rabbitmq/rabbitmq.conf
/etc/rabbitmq/rabbitmq.config
[kafka]
title=Kafka Logs
patterns=
/var/log/kafka/server.log
/etc/kafka/server.properties
/*/logs/controller.log*
/*/logs/server.log*
/*/logs/state-change.log*
/*/logs/kafka-*.log*
[mongodb]
title=MongoDB Logs
patterns=
/var/log/mongodb/mongod.log
[apache_tomcat]
title=Apache Tomcat Logs
patterns=
/opt/tomcat/logs/localhost_access_log.*.txt
/opt/tomcat/logs/catalina.*.log
/opt/tomcat/logs/localhost.*.log
[prometheus]
title=Prometheus Server overview
patterns=
/var/log/prometheus/prometheus.log
/etc/prometheus/prometheus.yml

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path d="M15.5646755,17.622594 C14.3918452,17.622594 13.3403844,18.1422037 12.6203539,18.9602753 L10.7753157,17.6541145 C10.971174,17.1148684 11.0836316,16.5358415 11.0836316,15.9297874 C11.0836316,15.33424 10.9750868,14.7649232 10.7856774,14.2336471 L12.6265852,12.9413262 C13.3465437,13.7552674 14.3952507,14.2720513 15.5646755,14.2720513 C17.7294051,14.2720513 19.4908249,12.5109142 19.4908249,10.3458866 C19.4908249,8.18085899 17.7294051,6.41972245 15.5646755,6.41972245 C13.3999464,6.41972245 11.6385266,8.18085899 11.6385266,10.3458866 C11.6385266,10.7334018 11.6970742,11.1070772 11.8021403,11.460971 L9.96000103,12.7539449 C9.19048061,11.7992863 8.08250112,11.1327279 6.82011088,10.9292609 L6.82011088,8.70909159 C8.59855813,8.33556068 9.93855275,6.75542894 9.93855275,4.86734274 C9.93855275,2.70231497 8.17713359,0.94117843 6.01240411,0.94117843 C3.84767458,0.94117843 2.08625504,2.70231497 2.08625504,4.86734274 C2.08625504,6.73014042 3.39154164,8.29078075 5.13441158,8.69097623 L5.13441158,10.9399848 C2.75585388,11.3574988 0.941176519,13.4333281 0.941176519,15.9297874 C0.941176519,18.4384197 2.77382382,20.5218575 5.16955446,20.9251689 L5.16955446,23.299968 C3.4088595,23.686976 2.08625504,25.2571812 2.08625504,27.1326595 C2.08625504,29.2976871 3.84767458,31.0588235 6.01240411,31.0588235 C8.17713359,31.0588235 9.93855275,29.2976871 9.93855275,27.1326595 C9.93855275,25.2571812 8.61594854,23.686976 6.85525377,23.299968 L6.85525377,20.925097 C8.09279026,20.7167021 9.18040849,20.0633318 9.94203083,19.1298313 L11.7993871,20.4444706 C11.6962768,20.795176 11.6385266,21.1651562 11.6385266,21.5487587 C11.6385266,23.7137863 13.3999464,25.4749227 15.5646755,25.4749227 C17.7294051,25.4749227 19.4908249,23.7137863 19.4908249,21.5487587 C19.4908249,19.383731 17.7294051,17.622594 15.5646755,17.622594 Z M15.5646755,8.44229398 C16.6143976,8.44229398 17.4681888,9.29645062 17.4681888,10.3458866 C17.4681888,11.3953225 16.6143976,12.2494066 15.5646755,12.2494066 C14.514954,12.2494066 13.6611628,11.3953225 13.6611628,10.3458866 C13.6611628,9.29645062 14.514954,8.44229398 15.5646755,8.44229398 Z M4.10881884,4.86734274 C4.10881884,3.81790678 4.9626824,2.96382257 6.01240411,2.96382257 C7.06212602,2.96382257 7.91591658,3.81790678 7.91591658,4.86734274 C7.91591658,5.91677869 7.06212602,6.77086284 6.01240411,6.77086284 C4.9626824,6.77086284 4.10881884,5.91677869 4.10881884,4.86734274 Z M7.91591658,27.1326595 C7.91591658,28.1820954 7.06212602,29.0361795 6.01240411,29.0361795 C4.9626824,29.0361795 4.10881884,28.1820954 4.10881884,27.1326595 C4.10881884,26.0832235 4.9626824,25.2291388 6.01240411,25.2291388 C7.06212602,25.2291388 7.91591658,26.0832235 7.91591658,27.1326595 Z M6.0122592,18.584571 C4.54821365,18.584571 3.35719582,17.3937659 3.35719582,15.9297874 C3.35719582,14.4657363 4.54821365,13.2747136 6.0122592,13.2747136 C7.47623227,13.2747136 8.66724978,14.4657363 8.66724978,15.9297874 C8.66724978,17.3937659 7.47623227,18.584571 6.0122592,18.584571 Z M15.5646755,23.4523513 C14.514954,23.4523513 13.6611628,22.5981946 13.6611628,21.5487587 C13.6611628,20.4993227 14.514954,19.6452386 15.5646755,19.6452386 C16.6143976,19.6452386 17.4681888,20.4993227 17.4681888,21.5487587 C17.4681888,22.5981946 16.6143976,23.4523513 15.5646755,23.4523513 Z" transform="translate(6)"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<g fill="none" transform="translate(9)">
<path fill="#FFF" d="M7.84402797,31.8471608 L6.99748252,31.5578182 C6.99748252,31.5578182 7.10086713,27.2420699 5.55188811,26.9323636 C4.51960839,25.7344895 5.71748252,-23.8677483 9.43440559,26.766993 C9.43440559,26.766993 8.15395804,27.406993 7.92682517,28.5017063 C7.67888112,29.5756084 7.84402797,31.8471608 7.84402797,31.8471608 Z"/>
<path fill="#A6A385" d="M7.84402797,31.8471608 L6.99748252,31.5578182 C6.99748252,31.5578182 7.10086713,27.2420699 5.55188811,26.9323636 C4.51960839,25.7344895 5.71748252,-23.8677483 9.43440559,26.766993 C9.43440559,26.766993 8.15395804,27.406993 7.92682517,28.5017063 C7.67888112,29.5756084 7.84402797,31.8471608 7.84402797,31.8471608 Z"/>
<path fill="#FFF" d="M8.29851748,27.6757483 C8.29851748,27.6757483 15.7122238,22.8021259 13.9772867,12.6626014 C12.3047832,5.29074126 8.3605035,2.87462937 7.92682517,1.94528671 C7.45197203,1.28447552 6.99748252,0.128223776 6.99748252,0.128223776 L7.30741259,20.6337343 C7.30741259,20.6545455 6.66718881,26.9115524 8.29874126,27.675972"/>
<path fill="#499D4A" d="M8.29851748,27.6757483 C8.29851748,27.6757483 15.7122238,22.8021259 13.9772867,12.6626014 C12.3047832,5.29074126 8.3605035,2.87462937 7.92682517,1.94528671 C7.45197203,1.28447552 6.99748252,0.128223776 6.99748252,0.128223776 L7.30741259,20.6337343 C7.30741259,20.6545455 6.66718881,26.9115524 8.29874126,27.675972"/>
<path fill="#FFF" d="M6.56402797,27.9440559 C6.56402797,27.9440559 -0.395412587,23.1944056 0.0176783217,14.8312168 C0.409958042,6.4678042 5.32475524,2.35837762 6.27468531,1.61499301 C6.89432168,0.954181818 6.91490909,0.706237762 6.95630769,0.0454265734 C7.38998601,0.974769231 7.30741259,13.9432727 7.36917483,15.4712168 C7.55490909,21.3565315 7.03888112,26.8292028 6.56402797,27.9440559 Z"/>
<path fill="#58AA50" d="M6.56402797,27.9440559 C6.56402797,27.9440559 -0.395412587,23.1944056 0.0176783217,14.8312168 C0.409958042,6.4678042 5.32475524,2.35837762 6.27468531,1.61499301 C6.89432168,0.954181818 6.91490909,0.706237762 6.95630769,0.0454265734 C7.38998601,0.974769231 7.30741259,13.9432727 7.36917483,15.4712168 C7.55490909,21.3565315 7.03888112,26.8292028 6.56402797,27.9440559 Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path fill="#F60" d="M30.0833217,13.1972069 L20.2053242,13.1972069 C19.4153744,13.1088631 18.8138529,12.456478 18.8138529,11.6885664 L18.8138529,1.97074666 C18.8138529,1.14167392 18.0963754,0.475697468 17.2194585,0.475697468 L13.7625218,0.475697468 C12.8783577,0.475697468 12.1681275,1.1484696 12.1681275,1.97074666 L12.1681275,11.7905015 C12.1246439,12.5312304 11.4723918,13.1292501 10.6896891,13.1972069 L8.10242197,13.1972069 C7.34146106,13.1088631 6.75443406,12.5108434 6.70370334,11.7905015 L6.70370334,1.97074666 C6.70370334,1.14167392 5.9862259,0.475697468 5.10930903,0.475697468 L1.65237229,0.475697468 C0.768208166,0.475697468 0.0579779748,1.1484696 0.0579779748,1.97074666 L0.0579779748,14.6922561 L0.0579779748,30.3291114 C0.0579779748,31.1581841 0.775455413,31.8241606 1.65237229,31.8241606 L5.10930903,31.8241606 L13.7625218,31.8241606 L17.2194585,31.8241606 L30.0905689,31.8241606 C30.974733,31.8241606 31.6849632,31.1513884 31.6849632,30.3291114 L31.6849632,14.6922561 C31.6777159,13.8631834 30.9674859,13.1972069 30.0833217,13.1972069 Z M25.5320507,23.920787 C25.5320507,24.7498597 24.8145732,25.4158362 23.9376564,25.4158362 L20.4807196,25.4158362 C19.5965554,25.4158362 18.8863253,24.743064 18.8863253,23.920787 L18.8863253,20.8627318 C18.8863253,20.0336591 19.6038027,19.3676826 20.4807196,19.3676826 L23.9376564,19.3676826 C24.8218205,19.3676826 25.5320507,20.0404548 25.5320507,20.8627318 L25.5320507,23.920787 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><g transform="translate(0 3)" fill-rule="nonzero" fill="none"><path d="M30.594 20.791c-1.689.875-10.438 4.451-12.3 5.416-1.863.966-2.898.956-4.37.257-1.471-.699-10.782-4.437-12.46-5.234-.838-.399-1.278-.735-1.278-1.052v-3.18s12.121-2.623 14.078-3.32c1.957-.699 2.636-.724 4.301-.118 1.666.607 11.623 2.393 13.27 2.992l-.001 3.135c0 .314-.38.659-1.24 1.104z" fill="#A41E11"/><path d="M30.594 17.61c-1.689.875-10.438 4.451-12.3 5.417-1.863.965-2.898.956-4.37.256-1.471-.698-10.782-4.438-12.46-5.234-1.676-.797-1.712-1.345-.064-1.987 1.647-.641 10.907-4.252 12.864-4.95 1.957-.698 2.636-.723 4.301-.117 1.666.607 10.363 4.048 12.009 4.647 1.646.6 1.71 1.093.02 1.968z" fill="#D82C20"/><path d="M30.594 15.606c-1.689.875-10.438 4.45-12.3 5.416-1.863.965-2.898.956-4.37.257-1.471-.7-10.782-4.438-12.46-5.235-.838-.398-1.278-.734-1.278-1.051v-3.18S12.307 9.19 14.264 8.492c1.957-.698 2.636-.723 4.301-.117 1.666.606 11.623 2.392 13.27 2.991l-.001 3.135c0 .315-.38.66-1.24 1.105z" fill="#A41E11"/><path d="M30.594 12.425c-1.689.875-10.438 4.45-12.3 5.416-1.863.966-2.898.956-4.37.257-1.471-.699-10.782-4.438-12.46-5.235-1.676-.796-1.712-1.345-.064-1.986 1.647-.641 10.907-4.253 12.864-4.95 1.957-.698 2.636-.724 4.301-.117 1.666.606 10.363 4.047 12.009 4.646 1.646.6 1.71 1.094.02 1.969z" fill="#D82C20"/><path d="M30.594 10.228c-1.689.875-10.438 4.451-12.3 5.417-1.863.965-2.898.955-4.37.256-1.471-.699-10.782-4.438-12.46-5.234C.627 10.268.187 9.932.187 9.615v-3.18s12.121-2.623 14.078-3.32c1.957-.699 2.636-.724 4.301-.117 1.666.606 11.623 2.391 13.27 2.99l-.001 3.136c0 .314-.38.659-1.24 1.104z" fill="#A41E11"/><path d="M30.594 7.047c-1.689.875-10.438 4.451-12.3 5.417-1.863.965-2.898.955-4.37.256-1.471-.699-10.782-4.437-12.46-5.234C-.211 6.689-.247 6.14 1.4 5.499 3.047 4.858 12.307 1.247 14.264.55 16.221-.15 16.9-.174 18.565.432c1.666.607 10.363 4.048 12.009 4.647 1.646.6 1.71 1.093.02 1.968z" fill="#D82C20"/><path fill="#FFF" d="M20.157 3.985l-2.742.283-.614 1.468-.992-1.638-3.166-.283 2.362-.847-.708-1.3 2.212.86 2.085-.68-.563 1.345zM16.637 11.108l-5.118-2.11 7.334-1.119z"/><ellipse fill="#FFF" cx="9.541" cy="6.311" rx="3.92" ry="1.51"/><path fill="#7A0C00" d="M23.398 4.386l4.34 1.705-4.336 1.703z"/><path fill="#AD2115" d="M18.596 6.274l4.802-1.888.004 3.408-.471.183z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB