#12350 resolved conflict

This commit is contained in:
Daniel Maya 2024-02-08 09:19:13 +01:00
commit 9844f95f16
391 changed files with 165989 additions and 109272 deletions

View File

@ -520,18 +520,18 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin
#Define packages #Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
elif [ "$PANDORA_LTS" -ne '1' ] ; then elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE=" https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE=" https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
fi fi
if [ "$PANDORA_BETA" -eq '1' ] ; then if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz" PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz"
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz" PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
fi fi
@ -837,7 +837,7 @@ echo "@hourly root bash -c /etc/cron.hourly/pandora_db" >> /etc/cront
## Enabling agent adn configuring Agente ## Enabling agent adn configuring Agente
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF &>> "$LOGFILE" sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF &>> "$LOGFILE"
execute_cmd "/etc/init.d/pandora_agent_daemon start" "Starting PandoraFSM Agent" execute_cmd "/etc/init.d/pandora_agent_daemon restart" "Starting PandoraFSM Agent"
systemctl enable pandora_agent_daemon &>> "$LOGFILE" systemctl enable pandora_agent_daemon &>> "$LOGFILE"
#fix path phantomjs #fix path phantomjs

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, AIX version # Version 7.0NG.775, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, FreeBSD Version # Version 7.0NG.775, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, HP-UX Version # Version 7.0NG.775, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, GNU/Linux # Version 7.0NG.775, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, GNU/Linux # Version 7.0NG.775, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, Solaris Version # Version 7.0NG.775, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2023 Pandora FMS # (c) 2006-2023 Pandora FMS
# Version 7.0NG.774 # Version 7.0NG.775
# This program is Free Software, you can redistribute it and/or modify it # This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software # under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version # Foundation; either version 2 of the Licence or any later version

View File

@ -585,7 +585,7 @@ sub write_broker_conf($){
# Change the agent name # Change the agent name
if ($line =~ m/^\s*#*\s*agent_name\s+/) { if ($line =~ m/^\s*#*\s*agent_name\s+/) {
$line = "agent_name $broker_agent\n"; $line = "agent_name $broker_agent\n#broker active\n";
} }
# Change the logfile # Change the logfile
elsif ($line =~ m/^\s*logfile\s+(.*)/) { elsif ($line =~ m/^\s*logfile\s+(.*)/) {
@ -2179,16 +2179,7 @@ sub configure ($) {
#Launch tentacle server in proxy mode if configured #Launch tentacle server in proxy mode if configured
if ($Conf{'proxy_mode'}) { if ($Conf{'proxy_mode'}) {
return 1 if (launch_tentacle_proxy() != 0);
#Check if user is root
if ($> != 0) {
if (launch_tentacle_proxy() != 0) {
return 1;
}
} else {
error ('Proxy mode can not be launched as root');
return 1;
}
} }
# Add the plugins directory to the PATH # Add the plugins directory to the PATH

View File

@ -0,0 +1 @@
dist

View File

@ -0,0 +1,10 @@
# Makefile for winexe.py.
.PHONY: all build_image pandora_security_win.py
all: build_image pandora_security_win.py
build_image:
docker build -t pandora_security_win docker/
pandora_security_win.py:
docker run --rm -t -v`pwd`:/pybuild pandora_security_win

View File

@ -0,0 +1,5 @@
#!/bin/bash
# Build the winexe binary.
wine pip install -r src/requirements.txt
wine pyinstaller --onefile src/pandora_security_win.py
rm -rf build/ __pycache__/ pandora_security_win.spec

View File

@ -0,0 +1,34 @@
FROM i386/debian
# Update the package list.
RUN apt-get update
# Install needed packages.
RUN apt-get install --yes \
gnupg2 \
unzip \
software-properties-common \
wget \
xvfb
# Install WineHQ.
RUN wget -q https://dl.winehq.org/wine-builds/winehq.key -O- | apt-key add -
RUN apt-add-repository https://dl.winehq.org/wine-builds/debian/; apt-get update
RUN apt-get install --yes --install-recommends wine
# Use Windows 10.
COPY winetricks /tmp/winetricks
RUN /bin/bash /tmp/winetricks win10; rm -f /tmp/winetricks
# Install Python.
RUN wget https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe
RUN xvfb-run wine python-3.8.10.exe /quiet Include_doc=0 Include_dev=0 Include_test=0 InstallAllUsers=1 PrependPath=1 TargetDir=c:\python; echo
ENV WINEPATH="c:\\python;c:\\python\Scripts"
# Install Python modules..
RUN wine pip.exe install wheel
RUN wine pip.exe install pyinstaller
VOLUME ["/pybuild"]
WORKDIR "/pybuild"
ENTRYPOINT ["/bin/bash", "/pybuild/build.sh"]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,406 @@
import wmi, sys, winreg, os, subprocess, json, re
from datetime import datetime, timedelta
## Define modules
modules=[]
def print_module(module, print_flag=None):
"""Returns module in XML format. Accepts only {dict}.\n
- Only works with one module at a time: otherwise iteration is needed.
- Module "value" field accepts str type or [list] for datalists.
- Use print_flag to show modules' XML in STDOUT.
"""
data = dict(module)
module_xml = ("<module>\n"
"\t<name><![CDATA[" + str(data["name"]) + "]]></name>\n"
"\t<type>" + str(data["type"]) + "</type>\n"
)
if type(data["type"]) is not str and "string" not in data["type"]: #### Strip spaces if module not generic_data_string
data["value"] = data["value"].strip()
if isinstance(data["value"], list): # Checks if value is a list
module_xml += "\t<datalist>\n"
for value in data["value"]:
if type(value) is dict and "value" in value:
module_xml += "\t<data>\n"
module_xml += "\t\t<value><![CDATA[" + str(value["value"]) + "]]></value>\n"
if "timestamp" in value:
module_xml += "\t\t<timestamp><![CDATA[" + str(value["timestamp"]) + "]]></timestamp>\n"
module_xml += "\t</data>\n"
module_xml += "\t</datalist>\n"
else:
module_xml += "\t<data><![CDATA[" + str(data["value"]) + "]]></data>\n"
if "desc" in data:
module_xml += "\t<description><![CDATA[" + str(data["desc"]) + "]]></description>\n"
if "unit" in data:
module_xml += "\t<unit><![CDATA[" + str(data["unit"]) + "]]></unit>\n"
if "interval" in data:
module_xml += "\t<module_interval><![CDATA[" + str(data["interval"]) + "]]></module_interval>\n"
if "tags" in data:
module_xml += "\t<tags>" + str(data["tags"]) + "</tags>\n"
if "module_group" in data:
module_xml += "\t<module_group>" + str(data["module_group"]) + "</module_group>\n"
if "module_parent" in data:
module_xml += "\t<module_parent>" + str(data["module_parent"]) + "</module_parent>\n"
if "min_warning" in data:
module_xml += "\t<min_warning><![CDATA[" + str(data["min_warning"]) + "]]></min_warning>\n"
if "min_warning_forced" in data:
module_xml += "\t<min_warning_forced><![CDATA[" + str(data["min_warning_forced"]) + "]]></min_warning_forced>\n"
if "max_warning" in data:
module_xml += "\t<max_warning><![CDATA[" + str(data["max_warning"]) + "]]></max_warning>\n"
if "max_warning_forced" in data:
module_xml += "\t<max_warning_forced><![CDATA[" + str(data["max_warning_forced"]) + "]]></max_warning_forced>\n"
if "min_critical" in data:
module_xml += "\t<min_critical><![CDATA[" + str(data["min_critical"]) + "]]></min_critical>\n"
if "min_critical_forced" in data:
module_xml += "\t<min_critical_forced><![CDATA[" + str(data["min_critical_forced"]) + "]]></min_critical_forced>\n"
if "max_critical" in data:
module_xml += "\t<max_critical><![CDATA[" + str(data["max_critical"]) + "]]></max_critical>\n"
if "max_critical_forced" in data:
module_xml += "\t<max_critical_forced><![CDATA[" + str(data["max_critical_forced"]) + "]]></max_critical_forced>\n"
if "str_warning" in data:
module_xml += "\t<str_warning><![CDATA[" + str(data["str_warning"]) + "]]></str_warning>\n"
if "str_warning_forced" in data:
module_xml += "\t<str_warning_forced><![CDATA[" + str(data["str_warning_forced"]) + "]]></str_warning_forced>\n"
if "str_critical" in data:
module_xml += "\t<str_critical><![CDATA[" + str(data["str_critical"]) + "]]></str_critical>\n"
if "str_critical_forced" in data:
module_xml += "\t<str_critical_forced><![CDATA[" + str(data["str_critical_forced"]) + "]]></str_critical_forced>\n"
if "critical_inverse" in data:
module_xml += "\t<critical_inverse><![CDATA[" + str(data["critical_inverse"]) + "]]></critical_inverse>\n"
if "warning_inverse" in data:
module_xml += "\t<warning_inverse><![CDATA[" + str(data["warning_inverse"]) + "]]></warning_inverse>\n"
if "max" in data:
module_xml += "\t<max><![CDATA[" + str(data["max"]) + "]]></max>\n"
if "min" in data:
module_xml += "\t<min><![CDATA[" + str(data["min"]) + "]]></min>\n"
if "post_process" in data:
module_xml += "\t<post_process><![CDATA[" + str(data["post_process"]) + "]]></post_process>\n"
if "disabled" in data:
module_xml += "\t<disabled><![CDATA[" + str(data["disabled"]) + "]]></disabled>\n"
if "min_ff_event" in data:
module_xml += "\t<min_ff_event><![CDATA[" + str(data["min_ff_event"]) + "]]></min_ff_event>\n"
if "status" in data:
module_xml += "\t<status><![CDATA[" + str(data["status"]) + "]]></status>\n"
if "timestamp" in data:
module_xml += "\t<timestamp><![CDATA[" + str(data["timestamp"]) + "]]></timestamp>\n"
if "custom_id" in data:
module_xml += "\t<custom_id><![CDATA[" + str(data["custom_id"]) + "]]></custom_id>\n"
if "critical_instructions" in data:
module_xml += "\t<critical_instructions><![CDATA[" + str(data["critical_instructions"]) + "]]></critical_instructions>\n"
if "warning_instructions" in data:
module_xml += "\t<warning_instructions><![CDATA[" + str(data["warning_instructions"]) + "]]></warning_instructions>\n"
if "unknown_instructions" in data:
module_xml += "\t<unknown_instructions><![CDATA[" + str(data["unknown_instructions"]) + "]]></unknown_instructions>\n"
if "quiet" in data:
module_xml += "\t<quiet><![CDATA[" + str(data["quiet"]) + "]]></quiet>\n"
if "module_ff_interval" in data:
module_xml += "\t<module_ff_interval><![CDATA[" + str(data["module_ff_interval"]) + "]]></module_ff_interval>\n"
if "crontab" in data:
module_xml += "\t<crontab><![CDATA[" + str(data["crontab"]) + "]]></crontab>\n"
if "min_ff_event_normal" in data:
module_xml += "\t<min_ff_event_normal><![CDATA[" + str(data["min_ff_event_normal"]) + "]]></min_ff_event_normal>\n"
if "min_ff_event_warning" in data:
module_xml += "\t<min_ff_event_warning><![CDATA[" + str(data["min_ff_event_warning"]) + "]]></min_ff_event_warning>\n"
if "min_ff_event_critical" in data:
module_xml += "\t<min_ff_event_critical><![CDATA[" + str(data["min_ff_event_critical"]) + "]]></min_ff_event_critical>\n"
if "ff_type" in data:
module_xml += "\t<ff_type><![CDATA[" + str(data["ff_type"]) + "]]></ff_type>\n"
if "ff_timeout" in data:
module_xml += "\t<ff_timeout><![CDATA[" + str(data["ff_timeout"]) + "]]></ff_timeout>\n"
if "each_ff" in data:
module_xml += "\t<each_ff><![CDATA[" + str(data["each_ff"]) + "]]></each_ff>\n"
if "module_parent_unlink" in data:
module_xml += "\t<module_parent_unlink><![CDATA[" + str(data["parent_unlink"]) + "]]></module_parent_unlink>\n"
if "global_alerts" in data:
for alert in data["alert"]:
module_xml += "\t<alert_template><![CDATA[" + alert + "]]></alert_template>\n"
module_xml += "</module>\n"
if print_flag:
print (module_xml)
return (module_xml)
def check_antivirus_status():
try:
wmi_obj = wmi.WMI(namespace="root/SecurityCenter2")
antivirus_products = wmi_obj.query("SELECT * FROM AntivirusProduct")
for product in antivirus_products:
display_name = product.displayName
product_state = product.productState
product_state_hex = hex(product_state)
last_update = product.timestamp
atv_status = int(product_state_hex[3:5])
atv_uptodate = int(product_state_hex[5:7])
atv_status = 1 if atv_status in [10, 11] else 0
atv_uptodate = 1 if atv_uptodate in [00,] else 0
#print(f"{display_name}, product_state: {product_state}, product_state_hex: {product_state_hex}, last_update: {last_update}, status: {atv_status}, uptodate: {atv_uptodate}")
modules.append({
"name" : f"{display_name} Antivirus status",
"type" : "generic_proc",
"value": atv_status,
"module_group": "security",
"desc" : f"{display_name} state: {product_state}, last update: {last_update}",
})
modules.append({
"name" : f"{display_name} Antivirus up to date",
"type" : "generic_proc",
"value": atv_uptodate,
"module_group": "security",
"desc" : f"{display_name} state: {product_state}, last update: {last_update}",
})
except Exception as e:
print(f"Error check antivirus: {e}", file=sys.stderr)
def is_lock_screen_enabled():
try:
# Open the registry key
key_path = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, key_path) as key:
# Query the value of the DisableLockScreen key
value_name = "DisableLockScreen"
value, _ = winreg.QueryValueEx(key, value_name)
# Check if the lock screen is enabled (0 means enabled)
status = value == 0
if status == False: return status
except FileNotFoundError:
# If the registry key or value is not found, consider it as enabled
status = True
except Exception as e:
print(f"Error check lockscreen: {e}", file=sys.stderr)
status = False
try:
# Define the registry key for the lock screen settings
reg_key_path = r"SOFTWARE\Policies\Microsoft\Windows\Personalization"
reg_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, reg_key_path)
# Query the "NoLockScreen" DWORD value
value_name = "NoLockScreen"
value, _ = winreg.QueryValueEx(reg_key, value_name)
# Check if the "NoLockScreen" value is 0 (enabled)
status = value == 0
if status == False: return status
except FileNotFoundError:
# If the registry key or value is not found, consider it as enabled
status = True
except Exception as e:
print(f"Error check lockscreen: {e}", file=sys.stderr)
status = False
return status
def check_locksreen_enables():
status = is_lock_screen_enabled()
value = 1 if status == True else 0
modules.append({
"name" : "Lockscreen status",
"type" : "generic_proc",
"value": value,
"module_group": "security",
"desc" : f"Check lockscreen enable",
})
def convert_to_human_readable_date(timestamp_str):
try:
# Parse the timestamp string without the time zone
timestamp = datetime.strptime(timestamp_str, '%Y%m%d%H%M%S')
# Convert to a human-readable format
human_readable_date = timestamp.strftime('%Y-%m-%d %H:%M:%S %z')
return human_readable_date.strip()
except Exception as e:
print(f"Error converting date: {e}", file=sys.stderr)
return None
def check_time_difference(timestamp, timedays=10):
try:
# Convert the timestamp string to a datetime object
given_timestamp = datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S')
# Get the current time
current_time = datetime.now()
#Calculate the time difference
time_difference = current_time - given_timestamp
# Check if the time difference is greater than one hour
if time_difference < timedelta(days=timedays):
return "1"
else:
return "0"
except Exception as e:
print(f"Error check time difference: {e}", file=sys.stderr)
return 0
def get_windows_update_info(limit=5):
try:
# Connect to the Win32_ReliabilityRecords class in the root/cimv2 namespace
wmi_conn = wmi.WMI()
# Query the Win32_ReliabilityRecords class for Windows Update information
query = "SELECT * FROM Win32_ReliabilityRecords WHERE sourcename = 'Microsoft-Windows-WindowsUpdateClient'"
result = wmi_conn.query(query)
# Extract relevant information and format output
update_info = [
{
"date": convert_to_human_readable_date(record.timegenerated.split('.')[0]),
"update": record.message
}
for record in result[:limit]
]
last_update_date=update_info[0]['date']
value=check_time_difference(last_update_date)
modules.append({
"name" : "Microsoft Update system status",
"type" : "generic_proc",
"value": value,
"module_group": "security",
"desc" : f"Check if system was updated in the last 10 days. last update: {last_update_date}",
})
return True
except Exception as e:
print(f"Error windows update check: {e}", file=sys.stderr)
return False
def is_firewall_enabled():
try:
# Run PowerShell command to check if the Windows Firewall is enabled
result = subprocess.run(
['powershell', 'Get-NetFirewallProfile |Select-Object profile, enabled | ConvertTo-Json'],
capture_output=True,
text=True
)
result_json= json.loads(result.stdout)
for profile in result_json:
modules.append({
"name" : f"Firewall profile: {profile['Profile']} status",
"type" : "generic_proc",
"value": profile["Enabled"],
"module_group": "security",
"desc" : f"Check if firewall profile {profile['Profile']} is enabled",
})
return True
except Exception as e:
print(f"Error firewall check: {e}", file=sys.stderr)
return False
def check_password_enforcement():
enforce_pass = 1
counter = 0
try:
# Connect to the WMI service
wmi_service = wmi.WMI()
# Query for user accounts
users = wmi_service.Win32_UserAccount()
# Check if each user enforces password
for user in users:
# username = user.Name
# password_required = user.PasswordRequired
if user.PasswordRequired == False :
enforce_pass = 0
counter += 1
#print(f"User: {username}, Password Required: {password_required}")
modules.append({
"name" : "All users enforced password",
"type" : "generic_proc",
"value": enforce_pass,
"module_group": "security",
"desc" : f"Check if all users has enforced password, not secure users = {counter}",
})
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
print("Failed to check password enforcement for users.", file=sys.stderr)
def check_login_audit_policy():
try:
# Run the auditpol command to check the audit policy for Logon/Logoff
cmd_command = "auditpol /get /subcategory:Logon"
result = subprocess.run(cmd_command, shell=True, capture_output=True, text=True, check=True)
last_line = result.stdout.strip().split('\n')[-1]
cleaned_line = re.sub(' +', ' ', last_line)
# Interpret the result
if "Success and Failure" in result.stdout:
result = 1
elif "Aciertos y errores" in result.stdout:
result = 1
elif "No Auditing" in result.stdout:
result = 0
elif "Sin auditoría" in result.stdout:
result = 0
else:
print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr)
result = 0
modules.append({
"name" : "Check logon event audited",
"type" : "generic_proc",
"value": result,
"module_group": "security",
"desc" : f"Check if the logon events audit log is enables, status:{cleaned_line}",
})
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
print("Failed to check audit policy using auditpol command.", file=sys.stderr)
return
if __name__ == "__main__":
check_antivirus_status()
check_locksreen_enables()
get_windows_update_info()
is_firewall_enabled()
check_password_enforcement()
check_login_audit_policy()
for module in modules:
print_module(module, True)
# Windows Defender status values:
# 0: No action needed
# 266240: Antivirus is up to date
# 266256: Antivirus is out of date
# 266304: Antivirus is not monitoring
# 393216 (0x60000): No action needed.
# 393232 (0x60010): Antivirus is up to date.
# 393240 (0x60018): Antivirus is out of date.
# 393216 (0x60030): Antivirus is not monitoring.
# 397312 (0x61000): Antivirus is disabled.
# AVG Internet Security 2012 (from antivirusproduct WMI)
# 262144 (040000) = disabled and up to date
# 266240 (041000) = enabled and up to date
# AVG Internet Security 2012 (from firewallproduct WMI)
# 266256 (041010) = firewall enabled - (last two blocks not relevant it seems for firewall)
# 262160 (040010) = firewall disabled - (last two blocks not relevant it seems for firewall)
# Windows Defender
# 393472 (060100) = disabled and up to date
# 397584 (061110) = enabled and out of date
# 397568 (061100) = enabled and up to date
# Microsoft Security Essentials
# 397312 (061000) = enabled and up to date
# 393216 (060000) = disabled and up to date

View File

@ -0,0 +1 @@
WMI==1.5.1

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.774, AIX version # Version 7.0NG.775, AIX version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.774 # Version 7.0NG.775
# FreeBSD/IPSO version # FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena # Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.774, HPUX Version # Version 7.0NG.775, HPUX Version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774 # Version 7.0NG.775
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2023 Pandora FMS # (c) 2003-2023 Pandora FMS
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774 # Version 7.0NG.775
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2023 Pandora FMS # (c) 2003-2023 Pandora FMS
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774 # Version 7.0NG.775
# Licensed under GPL license v2, # Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.774, Solaris version # Version 7.0NG.775, Solaris version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, AIX version # Version 7.0NG.775, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.774-231211 Version: 7.0NG.775-240208
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.774-231211" pandora_version="7.0NG.775-240208"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -31,7 +31,7 @@ fi
if [ "$#" -ge 2 ]; then if [ "$#" -ge 2 ]; then
VERSION="$2" VERSION="$2"
else else
VERSION="7.0NG.774" VERSION="7.0NG.775"
fi fi
# Path for the generated DMG file # Path for the generated DMG file

View File

@ -19,11 +19,11 @@
<choice id="com.pandorafms.pandorafms_src" visible="false"> <choice id="com.pandorafms.pandorafms_src" visible="false">
<pkg-ref id="com.pandorafms.pandorafms_src"/> <pkg-ref id="com.pandorafms.pandorafms_src"/>
</choice> </choice>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.774" onConclusion="none">pandorafms_src.pdk</pkg-ref> <pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.775" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications"> <choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/> <pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
</choice> </choice>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.774" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref> <pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.775" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<!-- <installation-check script="check()" /> <!-- <installation-check script="check()" />
<script> <script>
<![CDATA[ <![CDATA[

View File

@ -5,9 +5,9 @@
<key>CFBundleIconFile</key> <string>pandorafms.icns</string> <key>CFBundleIconFile</key> <string>pandorafms.icns</string>
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string> <key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
<key>CFBundleVersion</key> <string>7.0NG.774</string> <key>CFBundleVersion</key> <string>7.0NG.775</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.774 Pandora FMS on Aug 2020</string> <key>CFBundleGetInfoString</key> <string>7.0NG.775 Pandora FMS on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.774</string> <key>CFBundleShortVersionString</key> <string>7.0NG.775</string>
<key>NSPrincipalClass</key><string>NSApplication</string> <key>NSPrincipalClass</key><string>NSApplication</string>
<key>NSMainNibFile</key><string>MainMenu</string> <key>NSMainNibFile</key><string>MainMenu</string>

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, GNU/Linux # Version 7.0NG.775, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, FreeBSD Version # Version 7.0NG.775, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, HP-UX Version # Version 7.0NG.775, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774 # Version 7.0NG.775
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2004-2023 Pandora FMS # Copyright (c) 2004-2023 Pandora FMS
# https://pandorafms.com # https://pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, GNU/Linux # Version 7.0NG.775, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, NetBSD Version # Version 7.0NG.775, NetBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.774, Solaris Version # Version 7.0NG.775, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2023 Pandora FMS # Copyright (c) 2003-2023 Pandora FMS
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1038,8 +1038,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads # Semaphore used to control the number of threads
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.774'; use constant AGENT_VERSION => '7.0NG.775';
use constant AGENT_BUILD => '231211'; use constant AGENT_BUILD => '240208';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -1860,7 +1860,7 @@ sub write_broker_conf($){
# Change the agent name # Change the agent name
if ($line =~ m/^\s*#*\s*agent_name\s+/) { if ($line =~ m/^\s*#*\s*agent_name\s+/) {
$line = "agent_name $broker_agent\n"; $line = "agent_name $broker_agent\n#broker active\n";
} }
# Change the logfile # Change the logfile
elsif ($line =~ m/^\s*logfile\s+(.*)/) { elsif ($line =~ m/^\s*logfile\s+(.*)/) {
@ -3678,9 +3678,21 @@ sub write_module_xml ($@) {
return; return;
} }
if ($module->{'func'} == \&module_logger) { # Is it an extraction log module?
$Xml .= $data[0]; if($module->{'type'} eq "log"){
return my $output = join('', @data);
if ($output eq "") {
return;
}
$Xml .="<log_module>\n";
$Xml .= " <source><![CDATA[" . $module->{'name'} . "]]></source>\n";
$Xml .= " <type><![CDATA[" . $module->{'type'} . "]]></type>\n";
$Xml .= " <encoding>base64</encoding>\n";
$Xml .= " <data><![CDATA[" . $output . "]]></data>\n";
$Xml .= "</log_module>\n";
return;
} }
# Critical section # Critical section
@ -3690,7 +3702,7 @@ sub write_module_xml ($@) {
" <name><![CDATA[" . $module->{'name'} . "]]></name>\n" . " <name><![CDATA[" . $module->{'name'} . "]]></name>\n" .
" <description><![CDATA[" . $module->{'description'} . "]]></description>\n" . " <description><![CDATA[" . $module->{'description'} . "]]></description>\n" .
" <type>" . $module->{'type'} . "</type>\n"; " <type>" . $module->{'type'} . "</type>\n";
# Interval # Interval
$Xml .= " <module_interval>" . $module->{'interval'} . "</module_interval>\n"; $Xml .= " <module_interval>" . $module->{'interval'} . "</module_interval>\n";
@ -3889,7 +3901,8 @@ sub module_logger ($) {
my $status = grep_logs( my $status = grep_logs(
$module->{'name'}, $module->{'name'},
$module->{'params'}, $module->{'params'},
$module->{'filter'} $module->{'filter'},
$module->{'type'}
); );
return $status; return $status;
@ -3926,20 +3939,25 @@ my $encode_sub = defined(&MIME::Base64::encode_base64) ? \&MIME::Base64::encode_
}; };
sub grep_logs { sub grep_logs {
my ($str_name, $str_file, $str_regex) = @_; my ($module_name, $log_file, $reg_exp, $module_type) = @_;
if(!$str_name){ if(!$module_name){
log_message("module_logger", "Missing module name"); log_message("module_logger", "Missing module name");
return; return;
} }
if(!$str_file){ if(!$log_file){
log_message("module_logger", "Missing file name"); log_message("module_logger", "Missing file name");
return; return;
} }
if(!$str_regex){ if(!$module_type){
$str_regex = '.*'; log_message("module_logger", "Missing module type");
return;
}
if(!$reg_exp){
$reg_exp = '.*';
} }
my $idx_dir = '/tmp/'; my $idx_dir = '/tmp/';
@ -3947,9 +3965,6 @@ sub grep_logs {
my $idx_pos = 0; my $idx_pos = 0;
my $idx_size = 0; my $idx_size = 0;
my $idx_ino = ''; my $idx_ino = '';
my $module_name = $str_name;
my $log_file = $str_file;
my $reg_exp = $str_regex;
# Check that log file exists # Check that log file exists
if (! -e $log_file) { if (! -e $log_file) {
@ -3975,7 +3990,7 @@ sub grep_logs {
return if load_idx(\$idx_pos, \$idx_ino, \$idx_file, \$idx_size) == 1; return if load_idx(\$idx_pos, \$idx_ino, \$idx_file, \$idx_size) == 1;
my @data = parse_log(\$idx_pos, \$idx_ino, \$idx_file, \$log_file, \$module_name, \$reg_exp, \$idx_size); my @data = parse_log(\$idx_pos, \$idx_ino, \$idx_file, \$log_file, \$module_name, \$reg_exp, \$idx_size);
my $output = create_log($module_name, @data); my $output = create_log($module_name, $module_type, @data);
return $output; return $output;
} }
@ -4090,27 +4105,32 @@ sub grep_logs {
} }
sub create_log { sub create_log {
my ($module_name, @data) = @_; my ($module_name, $module_type, @data) = @_;
# No data my $data_content = process_log_monitoring($module_type, @data);
if ($#data < 0) {
return;
}
# Log module
my $output = "<log_module>\n";
$output .= "<source><![CDATA[" . $module_name . "]]></source>\n";
$output .= "<encoding>base64</encoding>\n";
$output .= "<data><![CDATA[";
$output .= &$encode_sub(join('', @data), '');
$output .= "]]></data>\n";
$output .= "</log_module>\n";
return $output; return $data_content;
} }
} }
sub process_log_monitoring {
my ($module_type, @data) = @_;
my $output = "";
if ($module_type eq "log"){
$output = &$encode_sub(join('', @data), '');
} elsif ($module_type eq "generic_data") {
$output = scalar @data;
} elsif ($module_type eq "generic_proc"){
$output = scalar @data > 0 ? 1 : 0;
} elsif ($module_type eq "generic_data_string" || $module_type eq "async_string"){
$output = join('', @data);
}
return $output;
}
################################################################################ ################################################################################
# TERM Handler # TERM Handler
################################################################################ ################################################################################
@ -4283,6 +4303,10 @@ sub init_module ($) {
$module->{'alert_template'} = undef; $module->{'alert_template'} = undef;
$module->{'filter'} = undef; $module->{'filter'} = undef;
$module->{'absoluteinterval'} = undef; $module->{'absoluteinterval'} = undef;
$module->{'each_ff'} = undef;
$module->{'min_ff_event_normal'} = undef;
$module->{'min_ff_event_warning'} = undef;
$module->{'min_ff_event_critical'} = undef;
} }
################################################################################ ################################################################################
@ -4436,14 +4460,7 @@ my $PID = $$;
#Launch tentacle server in proxy mode if configured #Launch tentacle server in proxy mode if configured
if ($Conf{'proxy_mode'}) { if ($Conf{'proxy_mode'}) {
launch_tentacle_proxy();
#Check if user is root
if ($> != 0) {
launch_tentacle_proxy();
} else {
log_message ('error', 'Proxy mode can not be launched as root');
exit 1;
}
} }
# Advice if YAML::Tiny is allowed in this system # Advice if YAML::Tiny is allowed in this system

View File

@ -3,8 +3,8 @@
# #
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.774 %define version 7.0NG.775
%define release 231211 %define release 240208
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -4,8 +4,8 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.774 %define version 7.0NG.775
%define release 231211 %define release 240208
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version

View File

@ -4,8 +4,8 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.774 %define version 7.0NG.775
%define release 231211 %define release 240208
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version
@ -13,23 +13,22 @@ Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
License: GPL License: GPL
Vendor: ArticaST <http://www.artica.es> Vendor: PandoraFMS <https://pandorafms.com>
Source0: %{source_name}-%{version}.tar.gz Source0: %{source_name}-%{version}.tar.gz
URL: http://pandorafms.org URL: https://pandorafms.com
Group: System/Monitoring Group: System/Monitoring
Packager: Sancho Lerena <slerena@artica.es> Packager: PandoraFMS <info@pandorafms.com>
Prefix: /usr/share Prefix: /usr/share
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildArch: x86_64 BuildArch: x86_64
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): chkconfig /bin/ln Requires(post): /bin/ln
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel Requires(preun): /bin/rm /usr/sbin/userdel
Requires: coreutils unzip Requires: coreutils unzip
Requires: util-linux procps grep Requires: util-linux procps grep
Requires: /sbin/ip /bin/awk Requires: /sbin/ip /bin/awk
Requires: perl-interpreter Requires: perl-interpreter
Requires: perl-IO-Compress Requires: perl-IO-Compress
Requires: libnsl
Requires: libxcrypt-compat Requires: libxcrypt-compat
AutoReq: 0 AutoReq: 0
Provides: %{name}-%{version} Provides: %{name}-%{version}
@ -50,7 +49,7 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_agent/
mkdir -p $RPM_BUILD_ROOT/usr/bin/ mkdir -p $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/usr/sbin/ mkdir -p $RPM_BUILD_ROOT/usr/sbin/
mkdir -p $RPM_BUILD_ROOT/etc/pandora/ mkdir -p $RPM_BUILD_ROOT/etc/pandora/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ #mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
@ -58,7 +57,7 @@ cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon #cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
@ -119,21 +118,11 @@ then
cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/ cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
# Enable the services on SystemD # Enable the services on SystemD
systemctl daemon-reload
systemctl enable pandora_agent_daemon.service systemctl enable pandora_agent_daemon.service
else
/sbin/chkconfig --add pandora_agent_daemon
/sbin/chkconfig pandora_agent_daemon on
fi
if [ "$1" -gt 1 ]
then
echo "If Pandora Agent daemon was running with init.d script,"
echo "please stop it manually and start the service with systemctl"
fi fi
%preun %preun
# Upgrading # Upgrading
@ -141,8 +130,7 @@ if [ "$1" = "1" ]; then
exit 0 exit 0
fi fi
/sbin/chkconfig --del pandora_agent_daemon systemctl stop pandora_agent_daemon.service > /dev/null 2>&1 || :
/etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || :
# Remove symbolic links # Remove symbolic links
pushd /etc/pandora pushd /etc/pandora
@ -162,7 +150,6 @@ exit 0
%defattr(755,root,root) %defattr(755,root,root)
/usr/bin/pandora_agent_exec /usr/bin/pandora_agent_exec
/usr/bin/tentacle_client /usr/bin/tentacle_client
/etc/rc.d/init.d/pandora_agent_daemon
%defattr(644,root,root) %defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz /usr/share/man/man1/pandora_agent.1.gz

View File

@ -4,8 +4,8 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.774 %define version 7.0NG.775
%define release 231211 %define release 240208
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version
Name: %{name} Name: %{name}

View File

@ -3,8 +3,8 @@
# #
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.774 %define version 7.0NG.775
%define release 231211 %define release 240208
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.774" PI_VERSION="7.0NG.775"
PI_BUILD="231211" PI_BUILD="240208"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -1,9 +1,9 @@
bin_PROGRAMS = PandoraAgent bin_PROGRAMS = PandoraAgent
if DEBUG if DEBUG
PandoraAgent_SOURCES = misc/cron.cc misc/pandora_file.cc modules/pandora_data.cc modules/pandora_module_factory.cc modules/pandora_module.cc modules/pandora_module_list.cc modules/pandora_module_plugin.cc modules/pandora_module_inventory.cc modules/pandora_module_freememory.cc modules/pandora_module_exec.cc modules/pandora_module_perfcounter.cc modules/pandora_module_proc.cc modules/pandora_module_tcpcheck.cc modules/pandora_module_freememory_percent.cc modules/pandora_module_freedisk.cc modules/pandora_module_freedisk_percent.cc modules/pandora_module_logevent.cc modules/pandora_module_service.cc modules/pandora_module_cpuusage.cc modules/pandora_module_wmiquery.cc modules/pandora_module_regexp.cc modules/pandora_module_ping.cc modules/pandora_module_snmpget.cc udp_server/udp_server.cc main.cc pandora_strutils.cc pandora.cc windows_service.cc pandora_agent_conf.cc windows/pandora_windows_info.cc windows/pandora_wmi.cc pandora_windows_service.cc misc/md5.c misc/sha256.cc windows/wmi/disphelper.c ssh/libssh2/channel.c ssh/libssh2/mac.c ssh/libssh2/session.c ssh/libssh2/comp.c ssh/libssh2/misc.c ssh/libssh2/sftp.c ssh/libssh2/crypt.c ssh/libssh2/packet.c ssh/libssh2/userauth.c ssh/libssh2/hostkey.c ssh/libssh2/publickey.c ssh/libssh2/kex.c ssh/libssh2/scp.c ssh/pandora_ssh_client.cc ssh/pandora_ssh_test.cc ftp/pandora_ftp_client.cc ftp/pandora_ftp_test.cc debug_new.cpp PandoraAgent_SOURCES = misc/cron.cc misc/pandora_file.cc modules/pandora_data.cc modules/pandora_module_factory.cc modules/pandora_module.cc modules/pandora_module_list.cc modules/pandora_module_plugin.cc modules/pandora_module_inventory.cc modules/pandora_module_freememory.cc modules/pandora_module_exec.cc modules/pandora_module_exec_powershell.cc modules/pandora_module_perfcounter.cc modules/pandora_module_proc.cc modules/pandora_module_tcpcheck.cc modules/pandora_module_freememory_percent.cc modules/pandora_module_freedisk.cc modules/pandora_module_freedisk_percent.cc modules/pandora_module_logevent.cc modules/pandora_module_service.cc modules/pandora_module_cpuusage.cc modules/pandora_module_wmiquery.cc modules/pandora_module_regexp.cc modules/pandora_module_ping.cc modules/pandora_module_snmpget.cc udp_server/udp_server.cc main.cc pandora_strutils.cc pandora.cc windows_service.cc pandora_agent_conf.cc windows/pandora_windows_info.cc windows/pandora_wmi.cc pandora_windows_service.cc misc/md5.c misc/sha256.cc windows/wmi/disphelper.c ssh/libssh2/channel.c ssh/libssh2/mac.c ssh/libssh2/session.c ssh/libssh2/comp.c ssh/libssh2/misc.c ssh/libssh2/sftp.c ssh/libssh2/crypt.c ssh/libssh2/packet.c ssh/libssh2/userauth.c ssh/libssh2/hostkey.c ssh/libssh2/publickey.c ssh/libssh2/kex.c ssh/libssh2/scp.c ssh/pandora_ssh_client.cc ssh/pandora_ssh_test.cc ftp/pandora_ftp_client.cc ftp/pandora_ftp_test.cc debug_new.cpp
PandoraAgent_CXXFLAGS=-g -O0 PandoraAgent_CXXFLAGS=-g -O0
else else
PandoraAgent_SOURCES = misc/cron.cc misc/pandora_file.cc modules/pandora_data.cc modules/pandora_module_factory.cc modules/pandora_module.cc modules/pandora_module_list.cc modules/pandora_module_plugin.cc modules/pandora_module_inventory.cc modules/pandora_module_freememory.cc modules/pandora_module_exec.cc modules/pandora_module_perfcounter.cc modules/pandora_module_proc.cc modules/pandora_module_tcpcheck.cc modules/pandora_module_freememory_percent.cc modules/pandora_module_freedisk.cc modules/pandora_module_freedisk_percent.cc modules/pandora_module_logevent.cc modules/pandora_module_logchannel.cc modules/pandora_module_service.cc modules/pandora_module_cpuusage.cc modules/pandora_module_wmiquery.cc modules/pandora_module_regexp.cc modules/pandora_module_ping.cc modules/pandora_module_snmpget.cc udp_server/udp_server.cc main.cc pandora_strutils.cc pandora.cc windows_service.cc pandora_agent_conf.cc windows/pandora_windows_info.cc windows/pandora_wmi.cc pandora_windows_service.cc misc/md5.c misc/sha256.cc windows/wmi/disphelper.c ssh/libssh2/channel.c ssh/libssh2/mac.c ssh/libssh2/session.c ssh/libssh2/comp.c ssh/libssh2/misc.c ssh/libssh2/sftp.c ssh/libssh2/crypt.c ssh/libssh2/packet.c ssh/libssh2/userauth.c ssh/libssh2/hostkey.c ssh/libssh2/publickey.c ssh/libssh2/kex.c ssh/libssh2/scp.c ssh/pandora_ssh_client.cc ssh/pandora_ssh_test.cc ftp/pandora_ftp_client.cc ftp/pandora_ftp_test.cc PandoraAgent_SOURCES = misc/cron.cc misc/pandora_file.cc modules/pandora_data.cc modules/pandora_module_factory.cc modules/pandora_module.cc modules/pandora_module_list.cc modules/pandora_module_plugin.cc modules/pandora_module_inventory.cc modules/pandora_module_freememory.cc modules/pandora_module_exec.cc modules/pandora_module_exec_powershell.cc modules/pandora_module_perfcounter.cc modules/pandora_module_proc.cc modules/pandora_module_tcpcheck.cc modules/pandora_module_freememory_percent.cc modules/pandora_module_freedisk.cc modules/pandora_module_freedisk_percent.cc modules/pandora_module_logevent.cc modules/pandora_module_logchannel.cc modules/pandora_module_service.cc modules/pandora_module_cpuusage.cc modules/pandora_module_wmiquery.cc modules/pandora_module_regexp.cc modules/pandora_module_ping.cc modules/pandora_module_snmpget.cc udp_server/udp_server.cc main.cc pandora_strutils.cc pandora.cc windows_service.cc pandora_agent_conf.cc windows/pandora_windows_info.cc windows/pandora_wmi.cc pandora_windows_service.cc misc/md5.c misc/sha256.cc windows/wmi/disphelper.c ssh/libssh2/channel.c ssh/libssh2/mac.c ssh/libssh2/session.c ssh/libssh2/comp.c ssh/libssh2/misc.c ssh/libssh2/sftp.c ssh/libssh2/crypt.c ssh/libssh2/packet.c ssh/libssh2/userauth.c ssh/libssh2/hostkey.c ssh/libssh2/publickey.c ssh/libssh2/kex.c ssh/libssh2/scp.c ssh/pandora_ssh_client.cc ssh/pandora_ssh_test.cc ftp/pandora_ftp_client.cc ftp/pandora_ftp_test.cc
PandoraAgent_CXXFLAGS=-O2 PandoraAgent_CXXFLAGS=-O2
endif endif

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2023 Pandora FMS # (c) 2006-2023 Pandora FMS
# Version 7.0NG.774 # Version 7.0NG.775
# This program is Free Software, you can redistribute it and/or modify it # This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software # under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version # Foundation; either version 2 of the Licence or any later version
@ -538,3 +538,8 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default
#module_regexp C:\server\logs\xserver.log #module_regexp C:\server\logs\xserver.log
#module_pattern .* #module_pattern .*
#module_end #module_end
# Pandora basic security check plugin for windows.
#module_begin
#module_plugin "%PROGRAMFILES%\Pandora_Agent\util\pandora_security_win.exe"
#module_end

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c58891fbd16bf80f288e0ff4751801aa02dbf4e6c914625b4d49a364c7e0b511
size 7829249

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes} {Yes}
AppName AppName
{Pandora FMS Windows Agent v7.0NG.774} {Pandora FMS Windows Agent v7.0NG.775}
ApplicationID ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F} {17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{231211} {240208}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -236,6 +236,8 @@ Module_Kind
Pandora_Module::parseModuleKindFromString (string kind) { Pandora_Module::parseModuleKindFromString (string kind) {
if (kind == module_exec_str) { if (kind == module_exec_str) {
return MODULE_EXEC; return MODULE_EXEC;
} else if (kind == module_exec_powershell_str) {
return MODULE_EXEC_POWERSHELL;
} else if (kind == module_proc_str) { } else if (kind == module_proc_str) {
return MODULE_PROC; return MODULE_PROC;
} else if (kind == module_service_str) { } else if (kind == module_service_str) {

View File

@ -94,7 +94,8 @@ namespace Pandora_Modules {
MODULE_REGEXP, /**< The module searches a file for matches of a regular expression */ MODULE_REGEXP, /**< The module searches a file for matches of a regular expression */
MODULE_PLUGIN, /**< Plugin */ MODULE_PLUGIN, /**< Plugin */
MODULE_PING, /**< Ping module */ MODULE_PING, /**< Ping module */
MODULE_SNMPGET /**< SNMP get module */ MODULE_SNMPGET, /**< SNMP get module */
MODULE_EXEC_POWERSHELL /**< The module run a custom powershell command */
} Module_Kind; } Module_Kind;
/** /**
@ -109,24 +110,25 @@ namespace Pandora_Modules {
regex_t regexp; regex_t regexp;
} Condition; } Condition;
const string module_exec_str = "module_exec"; const string module_exec_str = "module_exec";
const string module_proc_str = "module_proc"; const string module_proc_str = "module_proc";
const string module_service_str = "module_service"; const string module_service_str = "module_service";
const string module_freedisk_str = "module_freedisk"; const string module_freedisk_str = "module_freedisk";
const string module_freedisk_percent_str = "module_freedisk_percent"; const string module_freedisk_percent_str = "module_freedisk_percent";
const string module_freememory_str = "module_freememory"; const string module_freememory_str = "module_freememory";
const string module_freememory_percent_str = "module_freememory_percent"; const string module_freememory_percent_str = "module_freememory_percent";
const string module_cpuusage_str = "module_cpuusage"; const string module_cpuusage_str = "module_cpuusage";
const string module_inventory_str = "module_inventory"; const string module_inventory_str = "module_inventory";
const string module_logevent_str = "module_logevent"; const string module_logevent_str = "module_logevent";
const string module_logchannel_str = "module_logchannel"; const string module_logchannel_str = "module_logchannel";
const string module_wmiquery_str = "module_wmiquery"; const string module_wmiquery_str = "module_wmiquery";
const string module_perfcounter_str = "module_perfcounter"; const string module_perfcounter_str = "module_perfcounter";
const string module_tcpcheck_str = "module_tcpcheck"; const string module_tcpcheck_str = "module_tcpcheck";
const string module_regexp_str = "module_regexp"; const string module_regexp_str = "module_regexp";
const string module_plugin_str = "module_plugin"; const string module_plugin_str = "module_plugin";
const string module_ping_str = "module_ping"; const string module_ping_str = "module_ping";
const string module_snmpget_str = "module_snmpget"; const string module_snmpget_str = "module_snmpget";
const string module_exec_powershell_str = "module_exec_powershell";
/** /**
* Pandora module super-class exception. * Pandora module super-class exception.

View File

@ -0,0 +1,91 @@
/* Pandora exec module. These modules exec a powershell command.
Copyright (c) 2006-2023 Pandora FMS.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "pandora_module_exec_powershell.h"
#include "../pandora_strutils.h"
#include <iostream>
#include <stdexcept>
#include <sstream>
#include <string>
#include <vector>
#include <cstdio>
#define EXEC_OK 0
#define EXEC_ERR -1
#define BUFSIZE 4096
using namespace Pandora;
using namespace Pandora_Strutils;
using namespace Pandora_Modules;
/**
* Creates a Pandora_Module_Exec_Powershell object.
*
* @param name Module name
* @param exec Command to be executed.
*/
Pandora_Module_Exec_Powershell::Pandora_Module_Exec_Powershell(string name, string exec)
: Pandora_Module (name) {
string escaped_exec;
for (char c : exec) {
if (c == '"' || c == '\\') {
escaped_exec += '\\';
}
escaped_exec += c;
}
this->module_exec = "powershell -C \"" + escaped_exec + "\"";
this->setKind (module_exec_powershell_str);
}
void Pandora_Module_Exec_Powershell::run() {
string output_result;
this->has_output = false;
FILE* pipe = popen(this->module_exec.c_str(), "r");
if (!pipe) {
pandoraLog ("Error while executing command.", GetLastError ());
return;
}
char buffer[BUFSIZE];
while (fgets(buffer, BUFSIZE, pipe) != NULL) {
output_result += buffer;
}
int result = pclose(pipe);
if (result == EXEC_ERR) {
pandoraLog ("Error while closing command process.", GetLastError ());
return;
}
if (result != EXEC_OK) {
pandoraLog ("Error invalid powershell command.", GetLastError ());
return;
}
this->has_output = true;
this->setOutput (output_result);
}

View File

@ -0,0 +1,43 @@
/* Pandora exec module. These modules exec a powershell command
Copyright (c) 2006-2023 Pandora FMS.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PANDORA_MODULE_EXEC_POWERWSHELL_H__
#define __PANDORA_MODULE_EXEC_POWERWSHELL_H__
#include "pandora_module.h"
namespace Pandora_Modules {
/**
* Module to execute a powershell command.
*
* Any custom order that want to be executed can be put in
* the <code>util</code> directory into the Pandora agent path.
*/
class Pandora_Module_Exec_Powershell : public Pandora_Module {
private:
string module_exec;
public:
Pandora_Module_Exec_Powershell (string name, string exec);
void run ();
};
}
#endif

View File

@ -22,6 +22,7 @@
#include "pandora_module_factory.h" #include "pandora_module_factory.h"
#include "pandora_module.h" #include "pandora_module.h"
#include "pandora_module_exec.h" #include "pandora_module_exec.h"
#include "pandora_module_exec_powershell.h"
#include "pandora_module_proc.h" #include "pandora_module_proc.h"
#include "pandora_module_service.h" #include "pandora_module_service.h"
#include "pandora_module_freedisk.h" #include "pandora_module_freedisk.h"
@ -129,6 +130,7 @@ using namespace Pandora_Strutils;
#define TOKEN_ALERT_TEMPLATE ("module_alert_template") #define TOKEN_ALERT_TEMPLATE ("module_alert_template")
#define TOKEN_USER_SESSION ("module_user_session ") #define TOKEN_USER_SESSION ("module_user_session ")
#define TOKEN_WAIT_TIMEOUT ("module_wait_timeout ") #define TOKEN_WAIT_TIMEOUT ("module_wait_timeout ")
#define TOKEN_EXEC_POWERSHELL ("module_exec_powershell ")
string string
parseLine (string line, string token) { parseLine (string line, string token) {
@ -158,7 +160,7 @@ Pandora_Module *
Pandora_Module_Factory::getModuleFromDefinition (string definition) { Pandora_Module_Factory::getModuleFromDefinition (string definition) {
list<string> tokens; list<string> tokens;
list<string>::iterator iter; list<string>::iterator iter;
string module_name, module_type, module_exec; string module_name, module_type, module_exec, module_exec_powershell;
string module_min, module_max, module_description; string module_min, module_max, module_description;
string module_interval, module_absoluteinterval; string module_interval, module_absoluteinterval;
string module_proc, module_service; string module_proc, module_service;
@ -268,6 +270,7 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
module_user_session = ""; module_user_session = "";
macro = ""; macro = "";
module_wait_timeout = ""; module_wait_timeout = "";
module_exec_powershell = "";
stringtok (tokens, definition, "\n"); stringtok (tokens, definition, "\n");
@ -302,6 +305,9 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
if (module_exec == "") { if (module_exec == "") {
module_exec = parseLine (line, TOKEN_EXEC); module_exec = parseLine (line, TOKEN_EXEC);
} }
if (module_exec_powershell == "") {
module_exec_powershell = parseLine (line, TOKEN_EXEC_POWERSHELL);
}
if (module_wait_timeout == "") { if (module_wait_timeout == "") {
module_wait_timeout = parseLine (line, TOKEN_WAIT_TIMEOUT); module_wait_timeout = parseLine (line, TOKEN_WAIT_TIMEOUT);
} }
@ -626,6 +632,13 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
} }
} }
if (module_exec_powershell != "") {
pos_macro = module_exec_powershell.find(macro_name);
if (pos_macro != string::npos){
module_exec_powershell.replace(pos_macro, macro_name.size(), macro_value);
}
}
if (module_proc != "") { if (module_proc != "") {
pos_macro = module_proc.find(macro_name); pos_macro = module_proc.find(macro_name);
if (pos_macro != string::npos){ if (pos_macro != string::npos){
@ -1155,6 +1168,9 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
module->setWaitTimeout (atoi (module_wait_timeout.c_str ())); module->setWaitTimeout (atoi (module_wait_timeout.c_str ()));
} }
} else if (module_exec_powershell != "") {
module = new Pandora_Module_Exec_Powershell (module_name, module_exec_powershell);
} else if (module_proc != "") { } else if (module_proc != "") {
module = new Pandora_Module_Proc (module_name, module = new Pandora_Module_Proc (module_name,
module_proc); module_proc);

View File

@ -48,7 +48,7 @@ Pandora_Module_Freedisk_Percent::Pandora_Module_Freedisk_Percent (string name, s
void void
Pandora_Module_Freedisk_Percent::run () { Pandora_Module_Freedisk_Percent::run () {
long res; double res;
try { try {
Pandora_Module::run (); Pandora_Module::run ();
@ -59,7 +59,7 @@ Pandora_Module_Freedisk_Percent::run () {
try { try {
res = Pandora_Wmi::getDiskFreeSpacePercent (this->disk_id); res = Pandora_Wmi::getDiskFreeSpacePercent (this->disk_id);
this->setOutput (longtostr (res)); this->setOutput(std::to_string(res));
} catch (Pandora_Wmi::Pandora_Wmi_Exception e) { } catch (Pandora_Wmi::Pandora_Wmi_Exception e) {
this->has_output = false; this->has_output = false;
} }

View File

@ -21,6 +21,7 @@
#include "pandora_module_factory.h" #include "pandora_module_factory.h"
#include "pandora_module_list.h" #include "pandora_module_list.h"
#include "pandora_module_exec.h" #include "pandora_module_exec.h"
#include "pandora_module_exec_powershell.h"
#include "pandora_module_proc.h" #include "pandora_module_proc.h"
#include "pandora_module_service.h" #include "pandora_module_service.h"
#include "pandora_module_freedisk.h" #include "pandora_module_freedisk.h"
@ -235,6 +236,7 @@ Pandora_Modules::Pandora_Module_List::parseModuleDefinition (string definition)
Pandora_Module_Plugin *module_plugin; Pandora_Module_Plugin *module_plugin;
Pandora_Module_Ping *module_ping; Pandora_Module_Ping *module_ping;
Pandora_Module_SNMPGet *module_snmpget; Pandora_Module_SNMPGet *module_snmpget;
Pandora_Module_Exec_Powershell *module_exec_powershell;
module = Pandora_Module_Factory::getModuleFromDefinition (definition); module = Pandora_Module_Factory::getModuleFromDefinition (definition);
@ -244,6 +246,11 @@ Pandora_Modules::Pandora_Module_List::parseModuleDefinition (string definition)
module_exec = (Pandora_Module_Exec *) module; module_exec = (Pandora_Module_Exec *) module;
modules->push_back (module_exec); modules->push_back (module_exec);
break;
case MODULE_EXEC_POWERSHELL:
module_exec_powershell = (Pandora_Module_Exec_Powershell *) module;
modules->push_back (module_exec_powershell);
break; break;
case MODULE_PROC: case MODULE_PROC:
module_proc = (Pandora_Module_Proc *) module; module_proc = (Pandora_Module_Proc *) module;

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.774 Build 231211") #define PANDORA_VERSION ("7.0NG.775 Build 240208")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS" VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.774(Build 231211))" VALUE "ProductVersion", "(7.0NG.775(Build 240208))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -188,11 +188,11 @@ Pandora_Wmi::getDiskFreeSpace (string disk_id) {
* @exception Pandora_Wmi_Exception Throwd if an error occured when reading * @exception Pandora_Wmi_Exception Throwd if an error occured when reading
* from WMI database. * from WMI database.
*/ */
unsigned long double
Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) { Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
CDhInitialize init; CDhInitialize init;
CDispPtr wmi_svc, quickfixes; CDispPtr wmi_svc, quickfixes;
double free_space = 0, size = 0; double free_space = 0, size = 0;
string query; string query;
query = "SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = \"" + disk_id + "\""; query = "SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = \"" + disk_id + "\"";
@ -202,7 +202,7 @@ Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
dhCheck (dhGetValue (L"%o", &quickfixes, wmi_svc, dhCheck (dhGetValue (L"%o", &quickfixes, wmi_svc,
L".ExecQuery(%T)", L".ExecQuery(%T)",
query.c_str ())); query.c_str ()));
FOR_EACH (quickfix, quickfixes, NULL) { FOR_EACH (quickfix, quickfixes, NULL) {
dhGetValue (L"%e", &free_space, quickfix, dhGetValue (L"%e", &free_space, quickfix,
L".FreeSpace"); L".FreeSpace");
@ -213,7 +213,7 @@ Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
return 0; return 0;
} }
return (unsigned long) (free_space * 100 / size); return (free_space * 100 / size);
} NEXT_THROW (quickfix); } NEXT_THROW (quickfix);
} catch (string errstr) { } catch (string errstr) {
pandoraLog ("getDiskFreeSpace error. %s", errstr.c_str ()); pandoraLog ("getDiskFreeSpace error. %s", errstr.c_str ());

View File

@ -44,7 +44,7 @@ namespace Pandora_Wmi {
int isProcessRunning (string process_name); int isProcessRunning (string process_name);
int isServiceRunning (string service_name); int isServiceRunning (string service_name);
unsigned long getDiskFreeSpace (string disk_id); unsigned long getDiskFreeSpace (string disk_id);
unsigned long getDiskFreeSpacePercent (string disk_id); double getDiskFreeSpacePercent (string disk_id);
int getCpuUsagePercentage (int cpu_id); int getCpuUsagePercentage (int cpu_id);
long getFreememory (); long getFreememory ();
long getFreememoryPercent (); long getFreememoryPercent ();

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.774-231211 Version: 7.0NG.775-240208
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.774-231211" pandora_version="7.0NG.775-240208"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -52,7 +52,9 @@ function agents_modules_load_js()
max_width = width; max_width = width;
} }
}); });
loadRecursionGroups();
$.each($('.th_class_module_r'), function (i, elem) { $.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', ''); id = $(elem).attr('id').replace('th_module_r_', '');
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px'); $("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
@ -139,29 +141,7 @@ function agents_modules_load_js()
}); });
$("#checkbox-recursion").change (function () { $("#checkbox-recursion").change (function () {
jQuery.post ("ajax.php", loadRecursionGroups();
{"page" : "operation/agentes/ver_agente",
"get_agents_group_json" : 1,
"id_group" : $("#group_id").val(),
"privilege" : "AW",
"keys_prefix" : "_",
"recursion" : $('#checkbox-recursion').is(':checked')
},
function (data, status) {
$("#id_agents2").html('');
$("#module").html('');
jQuery.each (data, function (id, value) {
// Remove keys_prefix from the index
id = id.substring(1);
option = $("<option></option>")
.attr ("value", value["id_agente"])
.html (value["alias"]);
$("#id_agents").append (option);
$("#id_agents2").append (option);
});
},
"json"
);
}); });
$("#modulegroup").change (function () { $("#modulegroup").change (function () {
@ -265,6 +245,33 @@ function agents_modules_load_js()
f.action = "index.php?sec=view&sec2=extensions/agents_modules"; f.action = "index.php?sec=view&sec2=extensions/agents_modules";
$('#filter_form').submit(); $('#filter_form').submit();
} }
function loadRecursionGroups () {
jQuery.post ("ajax.php",
{"page" : "operation/agentes/ver_agente",
"get_agents_group_json" : 1,
"id_group" : $("#group_id").val(),
"privilege" : "AW",
"keys_prefix" : "_",
"recursion" : $('#checkbox-recursion').is(':checked')
},
function (data, status) {
$("#id_agents2").html('');
$("#module").html('');
jQuery.each (data, function (id, value) {
// Remove keys_prefix from the index
id = id.substring(1);
option = $("<option></option>")
.attr ("value", value["id_agente"])
.html (value["alias"]);
$("#id_agents").append (option);
$("#id_agents2").append (option);
});
},
"json"
);
}
/* <![CDATA[ */ /* <![CDATA[ */
function export_csv() { function export_csv() {
let group_id = $('#group_id option:selected').val(); let group_id = $('#group_id option:selected').val();
@ -460,7 +467,7 @@ function mainAgentsModules()
$filter_groups .= html_print_label_input_block( $filter_groups .= html_print_label_input_block(
__('Recursion'), __('Recursion'),
html_print_checkbox_switch('recursion', 1, 0, true), html_print_checkbox_switch('recursion', 1, $recursion, true),
[ [
'div_class' => 'add-input-reverse', 'div_class' => 'add-input-reverse',
'label_class' => 'label-thin', 'label_class' => 'label-thin',
@ -720,6 +727,13 @@ function mainAgentsModules()
); );
} }
$group_id_for_agents_search = $group_id;
if ($group_id > 0) {
if ($recursion) {
$group_id_for_agents_search = groups_get_children_ids($group_id, true);
}
}
if (isset($agents_id[0]) === true && $agents_id[0] != -1) { if (isset($agents_id[0]) === true && $agents_id[0] != -1) {
$agents = $agents_id; $agents = $agents_id;
} else { } else {
@ -727,7 +741,7 @@ function mainAgentsModules()
$agents = $full_agents_id; $agents = $full_agents_id;
} else { } else {
$agents = ''; $agents = '';
$agents = agents_get_group_agents($group_id, ['disabled' => 0]); $agents = agents_get_group_agents($group_id_for_agents_search, ['disabled' => 0]);
$agents = array_keys($agents); $agents = array_keys($agents);
} }
} }
@ -860,10 +874,7 @@ function mainAgentsModules()
if ($group_id > 0) { if ($group_id > 0) {
if ($recursion) { if ($recursion) {
$filter_groups['id_grupo'] = array_merge( $filter_groups['id_grupo'] = groups_get_children_ids($group_id, true);
$group_id,
groups_get_children_ids($group_id, true)
);
} else { } else {
$filter_groups['id_grupo'] = $group_id; $filter_groups['id_grupo'] = $group_id;
} }
@ -880,7 +891,7 @@ function mainAgentsModules()
return; return;
} }
echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px">'; echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px" id="agents_modules_table">';
echo '<tr>'; echo '<tr>';
@ -1007,7 +1018,7 @@ function mainAgentsModules()
echo "<td class='center' style='text-align:left;'>"; echo "<td class='center' style='text-align:left;'>";
$win_handle = dechex(crc32($module_id.$module['name'])); $win_handle = dechex(crc32($module_id.$module['name']));
$graph_type = return_graphtype(modules_get_agentmodule_type($module_id)); $graph_type = return_graphtype(modules_get_agentmodule_type($module_id));
$link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."', 800, 480)"; $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&id='.$module_id.'&period_graph=0&refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."', 800, 480)";
echo '<a href="javascript:'.$link.'">'; echo '<a href="javascript:'.$link.'">';

View File

@ -34,11 +34,11 @@ if ((bool) $config['metaconsole']) {
include_once $config['homedir'].'/include/functions_modules.php'; include_once $config['homedir'].'/include/functions_modules.php';
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
} else { } else {
include_once '../include/config.php'; include_once __DIR__.'/../include/config.php';
include_once '../include/functions_agents.php'; include_once __DIR__.'/../include/functions_agents.php';
include_once '../include/functions_reporting.php'; include_once __DIR__.'/../include/functions_reporting.php';
include_once '../include/functions_modules.php'; include_once __DIR__.'/../include/functions_modules.php';
include_once '../include/functions_users.php'; include_once __DIR__.'/../include/functions_users.php';
} }

View File

@ -280,18 +280,17 @@ function dbmgr_extension_main()
if (is_array($result) === false) { if (is_array($result) === false) {
echo '<strong>Output: <strong>'.$result; echo '<strong>Output: <strong>'.$result;
db_pandora_audit(
AUDIT_LOG_SYSTEM,
'DB Interface Extension. SQL',
false,
false,
$sql
);
return; return;
} }
db_pandora_audit(
AUDIT_LOG_SYSTEM,
'DB Interface Extension. SQL',
false,
false,
$sql
);
echo "<div class='overflow'>"; echo "<div class='overflow'>";
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';

View File

@ -1,286 +0,0 @@
<?php
// Pandora FMS - https://pandorafms.com
// ==================================================
// Copyright (c) 2005-2023 Pandora FMS
// Please see https://pandorafms.com/community/ for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
function pandora_files_repo_install()
{
global $config;
if (isset($config['files_repo_installed']) && $config['files_repo_installed'] == 1) {
return;
}
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
$full_sql_dir = $full_extensions_dir.'files_repo/sql/';
$file_path = '';
switch ($config['dbtype']) {
case 'mysql':
$file_path = $full_sql_dir.'files_repo.sql';
break;
case 'postgresql':
$file_path = $full_sql_dir.'files_repo.postgreSQL.sql';
break;
case 'oracle':
$file_path = $full_sql_dir.'files_repo.oracle.sql';
break;
}
if (!empty($file_path)) {
$result = db_process_file($file_path);
if ($result) {
// Configuration values
$values = [
'token' => 'files_repo_installed',
'value' => 1,
];
db_process_sql_insert('tconfig', $values);
}
}
}
function pandora_files_repo_uninstall()
{
global $config;
switch ($config['dbtype']) {
case 'mysql':
db_process_sql('DROP TABLE `tfiles_repo_group`');
db_process_sql('DROP TABLE `tfiles_repo`');
db_process_sql(
'DELETE FROM `tconfig`
WHERE `token` LIKE "files_repo_%"'
);
break;
case 'postgresql':
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql(
'DELETE FROM "tconfig"
WHERE "token" LIKE \'files_repo_%\''
);
break;
case 'oracle':
db_process_sql('DROP TRIGGER "tfiles_repo_group_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_group_s"');
db_process_sql('DROP TABLE "tfiles_repo_group"');
db_process_sql('DROP TRIGGER "tfiles_repo_inc"');
db_process_sql('DROP SEQUENCE "tfiles_repo_s"');
db_process_sql('DROP TABLE "tfiles_repo"');
db_process_sql(
'DELETE FROM tconfig
WHERE token LIKE \'files_repo_%\''
);
break;
}
if (!empty($config['attachment_store'])) {
delete_dir($config['attachment_store'].'/files_repo');
}
}
function pandora_files_repo_godmode()
{
global $config;
if (!isset($config['files_repo_installed']) || !$config['files_repo_installed']) {
ui_print_error_message(__('Extension not installed'));
}
// ACL Check
check_login();
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access to Files repository'
);
include 'general/noaccess.php';
return;
}
// Header tabs.
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$godmode['active'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$onheader = [
'godmode' => $godmode,
'operation' => $operation,
];
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
$onheader,
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Files repository manager'),
],
]
);
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
// Directory files_repo check.
if (!files_repo_check_directory(true)) {
return;
}
$server_content_length = 0;
if (isset($_SERVER['CONTENT_LENGTH'])) {
$server_content_length = $_SERVER['CONTENT_LENGTH'];
}
// Check for an anoying error that causes the $_POST and $_FILES arrays.
// were empty if the file is larger than the post_max_size.
if (intval($server_content_length) > 0 && empty($_POST)) {
ui_print_error_message(__('Problem uploading. Please check this PHP runtime variable values: <pre> post_max_size (currently '.ini_get('post_max_size').')</pre>'));
}
// GET and POST parameters.
$file_id = (int) get_parameter('file_id');
$add_file = (bool) get_parameter('add_file');
$update_file = (bool) get_parameter('update_file');
$delete_file = (bool) get_parameter('delete');
// File add or update.
if ($add_file || ($update_file && $file_id > 0)) {
$groups = get_parameter('groups', []);
$public = (bool) get_parameter('public');
$description = io_safe_output((string) get_parameter('description'));
if (mb_strlen($description, 'UTF-8') > 200) {
$description = mb_substr($description, 0, 200, 'UTF-8');
}
$description = io_safe_input($description);
if ($add_file) {
$result = files_repo_add_file('upfile', $description, $groups, $public);
} else if ($update_file) {
$result = files_repo_update_file($file_id, $description, $groups, $public);
$file_id = 0;
}
if ($result['status'] == false) {
ui_print_error_message($result['message']);
}
}
// File delete.
if ($delete_file && $file_id > 0) {
$result = files_repo_delete_file($file_id);
if ($result !== -1) {
ui_print_result_message($result, __('Successfully deleted'), __('Could not be deleted'));
}
$file_id = 0;
}
// FORM.
include $full_extensions_dir.'files_repo/files_repo_form.php';
if (!$file_id) {
// LIST.
$manage = true;
include $full_extensions_dir.'files_repo/files_repo_list.php';
}
}
function pandora_files_repo_operation()
{
global $config;
// Header tabs.
$onheader = [];
if (check_acl($config['id_user'], 0, 'PM')) {
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$operation['active'] = 1;
$onheader = [
'godmode' => $godmode,
'operation' => $operation,
];
}
// Header.
ui_print_standard_header(
__('Files repository'),
'images/extensions.png',
false,
'',
false,
$onheader,
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Files repository'),
],
]
);
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
// Directory files_repo check.
if (!files_repo_check_directory(true)) {
return;
}
// LIST.
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include $full_extensions_dir.'files_repo/files_repo_list.php';
}
extensions_add_operation_menu_option(__('Files repository'), null, null, 'v1r1');
extensions_add_main_function('pandora_files_repo_operation');
extensions_add_godmode_menu_option(__('Files repository manager'), 'PM', null, null, 'v1r1');
extensions_add_godmode_function('pandora_files_repo_godmode');
pandora_files_repo_install();

View File

@ -1,168 +0,0 @@
<?php
// Pandora FMS - https://pandorafms.com
// ==================================================
// Copyright (c) 2005-2023 Pandora FMS
// Please see https://pandorafms.com/community/ for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
require_once $full_extensions_dir.'files_repo/functions_files_repo.php';
$offset = (int) get_parameter('offset');
$filter = [];
$filter['limit'] = $config['block_size'];
$filter['offset'] = $offset;
$filter['order'] = [
'field' => 'id',
'order' => 'DESC',
];
$files = files_repo_get_files($filter);
if (!empty($files)) {
if (!isset($manage)) {
$manage = false;
}
// Pagination
if ($manage) {
$url = ui_get_full_url('index.php?sec=godmode/extensions&sec2=extensions/files_repo');
} else {
$url = ui_get_full_url('index.php?sec=extensions&sec2=extensions/files_repo');
}
$total_files = files_repo_get_files(false, true);
ui_pagination($total_files, $url, $offset);
$table = new stdClass();
$table->width = '100%';
$table->class = 'info_table';
$table->style = [];
$table->style[1] = 'max-width: 200px;';
$table->style[4] = 'text-align: center;';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Description');
$table->head[2] = __('Size');
$table->head[3] = __('Last modification');
$table->head[4] = '';
$table->data = [];
foreach ($files as $file_id => $file) {
$data = [];
// Prepare the filename for the get_file.php script
$document_root = str_replace(
'\\',
'/',
io_safe_output($_SERVER['DOCUMENT_ROOT'])
);
$file['location'] = str_replace(
'\\',
'/',
io_safe_output($file['location'])
);
$relative_path = str_replace($document_root, '', $file['location']);
$file_name = explode('/', $file['location']);
$file_decoded = $file_name[(count($file_name) - 1)];
$file_path = base64_encode($file_decoded);
$hash = md5($file_path.$config['server_unique_identifier']);
$url = ui_get_full_url(
'include/get_file.php?file='.urlencode($file_path).'&hash='.$hash
);
$date_format = ($config['date_format']) ? io_safe_output($config['date_format']) : 'F j, Y - H:m';
$data[0] = "<a href=\"$url\" target=\"_blank\">".$file['name'].'</a>';
// Name
$data[1] = ui_print_truncate_text(
$file['description'],
'description',
true,
true
);
// Description
$data[2] = ui_format_filesize($file['size']);
// Size
$data[3] = date($date_format, $file['mtime']);
// Last modification
// Public URL
$data[4] = '';
$table->cellclass[][4] = 'table_action_buttons';
if (!empty($file['hash'])) {
$public_url = ui_get_full_url(
EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']
);
$message = __('Copy to clipboard').': Ctrl+C -> Enter';
$action = "window.prompt('$message', '$public_url');";
$data[4] .= "<a href=\"javascript:;\" onclick=\"$action\">";
$data[4] .= html_print_image(
'images/world.png',
true,
['title' => __('Public link')]
);
// Public link image
$data[4] .= '</a> ';
}
$data[4] .= "<a href=\"$url\" target=\"_blank\">";
$data[4] .= html_print_image(
'images/download.png',
true,
[
'title' => __('Download'),
'style' => 'padding:3px',
]
);
// Download image
$data[4] .= '</a>';
if ($manage) {
$config_url = ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
);
$data[4] .= "<a href=\"$config_url\">";
$data[4] .= html_print_image(
'images/edit.svg',
true,
[
'title' => __('Edit'),
'class' => 'main_menu_icon invert_filter',
]
);
// Edit image
$data[4] .= '</a>';
$delete_url = ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&delete=1&file_id='.$file_id
);
$data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">";
$data[4] .= html_print_image(
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'main_menu_icon invert_filter',
]
);
// Delete image
$data[4] .= '</a>';
}
$table->data[] = $data;
}
html_print_table($table);
} else {
ui_print_info_message(__('No items'));
}

View File

@ -1,16 +0,0 @@
CREATE TABLE tfiles_repo (
id NUMBER(5, 0) NOT NULL PRIMARY KEY,
name VARCHAR2(255) NOT NULL,
description VARCHAR2(500) NULL,
hash VARCHAR2(8) NULL
);
CREATE SEQUENCE tfiles_repo_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER tfiles_repo_inc BEFORE INSERT ON tfiles_repo REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tfiles_repo_s.nextval INTO :NEW.ID FROM dual; END;;
CREATE TABLE tfiles_repo_group (
id NUMBER(10, 0) NOT NULL PRIMARY KEY,
id_file NUMBER(5, 0) NOT NULL REFERENCES tfiles_repo(id) ON DELETE CASCADE,
id_group NUMBER(4, 0) NOT NULL
);
CREATE SEQUENCE tfiles_repo_group_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER tfiles_repo_group_inc BEFORE INSERT ON tfiles_repo_group REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tfiles_repo_group_s.nextval INTO :NEW.ID FROM dual; END;;

View File

@ -1,2 +0,0 @@
CREATE TABLE "tfiles_repo" ("id" SERIAL NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "description" VARCHAR(500) NULL default '', "hash" VARCHAR(8) NULL default '');
CREATE TABLE "tfiles_repo_group" ("id" SERIAL NOT NULL PRIMARY KEY, "id_file" INTEGER NOT NULL REFERENCES tfiles_repo("id") ON DELETE CASCADE, "id_group" INTEGER NOT NULL);

View File

@ -1,15 +0,0 @@
CREATE TABLE IF NOT EXISTS `tfiles_repo` (
`id` int(5) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`description` varchar(500) NULL default '',
`hash` varchar(8) NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tfiles_repo_group` (
`id` int(10) unsigned NOT NULL auto_increment,
`id_file` int(5) unsigned NOT NULL,
`id_group` int(4) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_file`) REFERENCES tfiles_repo(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -3,7 +3,7 @@
// Allow Grafana proxy // Allow Grafana proxy
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization'); header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
// Get all request headers // Get all request headers
$headers = apache_request_headers(); $headers = apache_request_headers();
@ -23,7 +23,10 @@ if ($headers['X-DS-Authorization']) {
list($user, $password) = explode(':', base64_decode($headers['X-DS-Authorization'])); list($user, $password) = explode(':', base64_decode($headers['X-DS-Authorization']));
// Check user login // Prevent sql injection.
$user = mysqli_real_escape_string($config['dbconnection'], $user);
// Check user login.
$user_in_db = process_user_login($user, $password, true); $user_in_db = process_user_login($user, $password, true);
if ($user_in_db !== false) { if ($user_in_db !== false) {

View File

@ -2,7 +2,7 @@
// Allow Grafana proxy. // Allow Grafana proxy.
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization'); header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
// Get all request headers. // Get all request headers.
$headers = apache_request_headers(); $headers = apache_request_headers();
@ -23,6 +23,9 @@ if ($headers['Authorization']) {
list($user, $password) = explode(':', base64_decode($headers['Authorization'])); list($user, $password) = explode(':', base64_decode($headers['Authorization']));
// Prevent sql injection.
$user = mysqli_real_escape_string($config['dbconnection'], $user);
// Check user login // Check user login
$user_in_db = process_user_login($user, $password, true); $user_in_db = process_user_login($user, $password, true);
@ -38,7 +41,7 @@ if ($headers['Authorization']) {
$result_data = []; $result_data = [];
// Decode target data sent by datasource plugin in Grafana // Decode target data sent by datasource plugin in Grafana
$target_data = json_decode($target['target'], true); $target_data = $target['target'];
if ($target_data['module']) { if ($target_data['module']) {
// Get module name as target if not defined in Grafana. // Get module name as target if not defined in Grafana.

View File

@ -3,7 +3,7 @@
// Allow Grafana proxy // Allow Grafana proxy
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization'); header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
// Get all request headers // Get all request headers
$headers = apache_request_headers(); $headers = apache_request_headers();
@ -24,6 +24,9 @@ if ($headers['Authorization']) {
list($user, $password) = explode(':', base64_decode($headers['Authorization'])); list($user, $password) = explode(':', base64_decode($headers['Authorization']));
// Prevent sql injection.
$user = mysqli_real_escape_string($config['dbconnection'], $user);
// Check user login // Check user login
$user_in_db = process_user_login($user, $password, true); $user_in_db = process_user_login($user, $password, true);

View File

@ -223,7 +223,7 @@ function mainInsertData()
'', '',
empty($agent_id) empty($agent_id)
); );
$table->data[1][2] = html_print_input_text('data', ($save === true) ? date(DATE_FORMAT) : $data, __('Data'), 10, 60, true); $table->data[1][2] = html_print_input_text('date', ($save === true) ? date(DATE_FORMAT) : $data, __('Data'), 10, 60, true);
$table->data[1][2] .= '&nbsp;'; $table->data[1][2] .= '&nbsp;';
$table->data[1][2] .= html_print_input_text('time', ($save === true) ? date(TIME_FORMAT) : $time, '', 10, 7, true); $table->data[1][2] .= html_print_input_text('time', ($save === true) ? date(TIME_FORMAT) : $time, '', 10, 7, true);
@ -283,8 +283,14 @@ function mainInsertData()
secondText: '<?php echo __('Second'); ?>', secondText: '<?php echo __('Second'); ?>',
currentText: '<?php echo __('Now'); ?>', currentText: '<?php echo __('Now'); ?>',
closeText: '<?php echo __('Close'); ?>'}); closeText: '<?php echo __('Close'); ?>'});
$("#text-date").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"}); $('#text-date').datepicker ({
dateFormat: '<?php echo DATE_FORMAT_JS; ?>',
changeMonth: true,
changeYear: true,
showAnim: 'slideDown',
firstDay: "<?php echo $config['datepicker_first_day']; ?>",
});
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]); $.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
}); });

View File

@ -345,6 +345,7 @@ function mainModuleGroups()
$table = new StdClass(); $table = new StdClass();
$table->class = 'info_table'; $table->class = 'info_table';
$table->style[0] = 'font-weight: bolder; min-width: 230px;'; $table->style[0] = 'font-weight: bolder; min-width: 230px;';
$table->id = 'agent_group_module_group';
$table->width = '100%'; $table->width = '100%';
$head[0] = __('Groups'); $head[0] = __('Groups');

View File

@ -31,7 +31,7 @@ function view_logfile($file_name, $toggle=false)
} else { } else {
$file_size = filesize($file_name); $file_size = filesize($file_name);
if ($memory_limit < $file_size) { if ($memory_limit < $file_size && $memory_limit !== '-1') {
$code .= '<pre><h2>'.$file_name.' ('.__('File is too large than PHP memory allocated in the system.').')</h2>'; $code .= '<pre><h2>'.$file_name.' ('.__('File is too large than PHP memory allocated in the system.').')</h2>';
$code .= '<h2>'.__('The preview file is imposible.').'</h2>'; $code .= '<h2>'.__('The preview file is imposible.').'</h2>';
} else if ($file_size > ($config['max_log_size'] * 1000)) { } else if ($file_size > ($config['max_log_size'] * 1000)) {
@ -117,6 +117,7 @@ function pandoralogs_extension_main()
view_logfile($config['homedir'].'/log/console.log', true); view_logfile($config['homedir'].'/log/console.log', true);
} }
view_logfile('/var/log/php-fpm/www-error.log', true);
view_logfile($logs_directory.'/pandora_server.log', true); view_logfile($logs_directory.'/pandora_server.log', true);
view_logfile($logs_directory.'/pandora_server.error', true); view_logfile($logs_directory.'/pandora_server.error', true);

View File

@ -1720,4 +1720,19 @@ include/functions_integriaims.php
include/ajax/integria_incidents.ajax.php include/ajax/integria_incidents.ajax.php
enterprise/operation/log/log_source.php enterprise/operation/log/log_source.php
enterprise/include/class/LogSource.class.php enterprise/include/class/LogSource.class.php
include/chart_generator.php include/chart_generator.php
enterprise/extensions/translate_string.php
enterprise/extensions/translate_string/functions.php
enterprise/extensions/translate_string/translate_string.oracle.sql
enterprise/extensions/translate_string/translate_string.postgresql.sql
enterprise/extensions/translate_string/translate_string.sql
enterprise/extensions/translate_string
extensions/files_repo.php
extensions/files_repo/files_repo_form.php
extensions/files_repo/files_repo_get_file.php
extensions/files_repo/files_repo_list.php
extensions/files_repo/functions_files_repo.php
extensions/files_repo/sql/files_repo.oracle.sql
extensions/files_repo/sql/files_repo.postgreSQL.sql
extensions/files_repo/sql/files_repo.sql
extensions/files_repo

View File

@ -0,0 +1,30 @@
[agent_data]
agents_number="1"
agent_name="demo-global-agent"
agent_alias="demo-global-agent"
group="Demo servers"
address_network="192.168.0.0/24"
os_name="Linux"
os_versions[]="Rocky Linux 9.2 (Blue Onyx)"
os_versions[]="CentOS Linux 7 (Core)"
os_versions[]="CentOS Linux 6 (Core)"
os_versions[]="RHEL 8.2"
os_versions[]="RHEL 8.1"
os_versions[]="Alma Linux 9.1"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="Host Alive"
type[1]="generic_proc"
values[1]="PROC;5"
group[1]="Network"

View File

@ -0,0 +1,211 @@
[agent_data]
agents_number="4"
agent_name="linux"
agent_alias="linux"
group="Demo servers"
address_network="192.168.1.0/24"
os_name="Linux"
os_versions[]="Rocky Linux 9.2 (Blue Onyx)"
os_versions[]="CentOS Linux 7 (Core)"
os_versions[]="CentOS Linux 6 (Core)"
os_versions[]="RHEL 8.2"
os_versions[]="RHEL 8.1"
os_versions[]="Alma Linux 9.1"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="Network Usage"
type[1]="generic_data_inc"
description[1]="Network usage in the system"
values[1]="RANDOM;0;10000"
unit[1]="bytes/sec"
group[1]="Network"
name[2]="Network latency"
type[2]="generic_data"
description[2]="Network latency to router"
values[2]="RANDOM;0;20"
unit[2]="msec"
group[2]="Network"
name[3]="CPU Load"
type[3]="generic_data"
description[3]="CPU Usage"
values[3]="RANDOM;20;90"
unit[3]="%"
group[3]="System"
name[4]="Disk Usage"
type[4]="generic_data"
description[4]="% used space"
values[4]="RANDOM;50;60"
unit[4]="%"
group[4]="System"
name[5]="Memory Usage"
type[5]="generic_data"
description[5]="% Used memory"
values[5]="RANDOM;0;20"
unit[5]="%"
group[5]="System"
name[6]="Antivirus Updated"
type[6]="generic_proc"
description[6]="Detect if A/V is enabled and updated"
values[6]="PROC;5"
group[6]="Security"
name[7]="Insecure passwords status"
type[7]="generic_proc"
description[7]="No insecure passwords found"
values[7]="PROC;0"
group[7]="Security"
name[8]="Files check status"
type[8]="generic_proc"
description[8]="No changed files found"
values[8]="PROC;0"
group[8]="Security"
name[9]="Authorized ports status"
type[9]="generic_proc"
description[9]="No unauthorized ports found"
values[9]="PROC;0"
group[9]="Security"
name[10]="Service httpd"
type[10]="generic_proc"
values[10]="PROC;5"
group[10]="Applications"
name[11]="Service mysqld"
type[11]="generic_proc"
values[11]="PROC;5"
group[11]="Applications"
name[12]="Service sshd"
type[12]="generic_proc"
values[12]="PROC;5"
group[12]="Applications"
[inventory]
name[1]="Software"
format[1]="Name;Version;Description"
values[1]="name;version;description"
name[2]="Users"
format[2]="Username"
values[2]="username"
name[3]="File System"
format[3]="Device;Free size;Total size;Mount point"
values[3]="device;free_size;total_size;mount_point"
[inventory_values]
name[1]="aajohan-comfortaa-fonts"
name[2]="aardvark-dns"
name[3]="abattis-cantarell-fonts"
name[4]="abrt"
version[1]="3.101"
version[2]="1.0.3"
version[3]="0.301"
version[4]="2.14.6"
description[1]="Modern style true type font"
description[2]="Authoritative DNS server for A/AAAA container records"
description[3]="Humanist sans serif font"
description[4]="Automatic bug detection and reporting tool"
username[1]="root"
username[2]="pandora"
device[1]="/dev/sda1"
device[2]="/dev/sda2"
device[3]="/dev/sdb1"
free_size[1]="96G"
free_size[2]="136G"
free_size[3]="97M"
total_size[1]="180G"
total_size[2]="1.6T"
total_size[3]="819M"
mount_point[1]="/home"
mount_point[2]="/"
mount_point[3]="/tmp"
[log_modules]
source[1]="httpd"
data[1]='127.0.0.1 - "GET /index.html HTTP/1.1" 200 3456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[2]="httpd"
data[2]='192.168.1.1 - "POST /submit.php HTTP/1.1" 302 0 "https://example.com/form" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[3]="httpd"
data[3]='10.0.0.2 - "GET /images/logo.png HTTP/1.1" 304 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1"'
source[4]="httpd"
data[4]='172.16.0.1 - "GET /page/about-us HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[5]="httpd"
data[5]='192.168.0.10 - "GET /css/style.css HTTP/1.1" 200 768 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[6]="httpd"
data[6]='203.0.113.45 - "GET /blog/post-123 HTTP/1.1" 200 5432 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[7]="httpd"
data[7]='54.78.90.12 - "GET /category/api-reference HTTP/1.1" 200 6543 "-" "Mozilla/5.0 (Linux; Android 10; SM-G960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36"'
source[8]="httpd"
data[8]='88.77.66.55 - "GET /contact-us HTTP/1.1" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[9]="httpd"
data[9]='198.51.100.23 - "GET /images/photo.jpg HTTP/1.1" 200 4567 "https://example.com/gallery" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[10]="httpd"
data[10]='128.0.0.1 - "GET /downloads/file.zip HTTP/1.1" 200 12345 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"'
source[11]="mysqld"
data[11]="[Warning] Aborted connection 123 to db: 'your_database' user: 'your_user' host: '192.168.1.100' (Got an error reading communication packets)"
source[12]="mysqld"
data[12]="[ERROR] Table 'your_database.your_table' doesn't exist"
source[13]="mysqld"
data[13]="[Note] Starting crash recovery..."
source[14]="mysqld"
data[14]="[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a LIMIT clause. Use a different log bin event type."
source[15]="mysqld"
data[15]="[ERROR] Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space"
source[16]="mysqld"
data[16]="[Note] Aborted connection 456 to db: 'another_database' user: 'another_user' host: 'localhost' (Got timeout reading communication packets)"
source[17]="mysqld"
data[17]="[ERROR] Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"
source[18]="mysqld"
data[18]="[Warning] 'user' entry 'your_user@localhost' ignored in --skip-name-resolve mode."
source[19]="mysqld"
data[19]="[Note] InnoDB: Starting rollback of uncommitted transactions"
source[20]="mysqld"
data[20]="[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed."

View File

@ -0,0 +1,118 @@
[agent_data]
agents_number="2"
agent_name="windows"
agent_alias="windows"
group="Demo servers"
address_network="192.168.2.0/24"
os_name="Windows"
os_versions[]="Microsoft Windows 11 Pro"
os_versions[]="Microsoft Windows 11"
os_versions[]="Home Microsoft Windows 10 Pro"
os_versions[]="Microsoft Windows 10 Home"
os_versions[]="Microsoft Windows 2018"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="Network Usage"
type[1]="generic_data_inc"
description[1]="Network usage in the system"
values[1]="RANDOM;0;10000"
unit[1]="bytes/sec"
group[1]="Network"
name[2]="Network latency"
type[2]="generic_data"
description[2]="Network latency to router"
values[2]="RANDOM;0;20"
unit[2]="msec"
group[2]="Network"
name[3]="CPU Load"
type[3]="generic_data"
description[3]="CPU Usage"
values[3]="RANDOM;20;90"
unit[3]="%"
group[3]="System"
name[4]="Disk Usage"
type[4]="generic_data"
description[4]="% used space"
values[4]="RANDOM;50;60"
unit[4]="%"
group[4]="System"
name[5]="Memory Usage"
type[5]="generic_data"
description[5]="% Used memory"
values[5]="RANDOM;0;20"
unit[5]="%"
group[5]="System"
name[6]="Service WMI"
type[6]="generic_proc"
values[6]="PROC;5"
group[6]="Applications"
[inventory]
name[1]="Software"
format[1]="Name;Version"
values[1]="name;version"
name[2]="Users"
format[2]="Domain;User"
values[2]="domain;user"
name[3]="File System"
format[3]="Device;Total size;Free size;Mount point"
values[3]="device;total_size;free_size;mount_point"
name[4]="Windows Serial Number"
format[4]="Serial number"
values[4]="serial_number"
[inventory_values]
name[1]="Microsoft Update Health Tools"
name[2]="Java(TM) SE Development Kit 17.0.6 (64-bit)"
name[3]="DisplayLink Graphics"
name[4]="Microsoft Visual C++ 2019 X64 Additional Runtime - 14.28.29325"
version[1]="5.71.0.0"
version[2]="17.0.6.0"
version[3]="10.2.7042.0"
version[4]="14.28.29325"
domain[1]="DEMO"
domain[2]="DEMO"
user[1]="Administrator"
user[2]="pandora"
device[1]="C:"
device[2]="D:"
device[3]="T:"
total_size[1]="1.6T"
total_size[2]="180G"
total_size[3]="819M"
free_size[1]="136G"
free_size[2]="96G"
free_size[3]="97M"
mount_point[1]="OS"
mount_point[2]="Data"
mount_point[3]="Temp"
serial_number[1]="Demo-56 4d 7d 43 24 e4 c6 ac-67 57 52 60 e9 10 26 78"

View File

@ -0,0 +1,74 @@
[agent_data]
agents_number="1"
agent_name="macos"
agent_alias="macos"
group="Demo servers"
address_network="192.168.3.0/24"
os_name="MacOS"
os_versions[]="12.1"
os_versions[]="13.1"
os_versions[]="11.2"
os_versions[]="11.3"
os_versions[]="10.3"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="Network Usage"
type[1]="generic_data_inc"
description[1]="Network usage in the system"
values[1]="RANDOM;0;10000"
unit[1]="bytes/sec"
group[1]="Network"
name[2]="Network latency"
type[2]="generic_data"
description[2]="Network latency to router"
values[2]="RANDOM;0;20"
unit[2]="msec"
group[2]="Network"
name[3]="CPU Load"
type[3]="generic_data"
description[3]="CPU Usage"
values[3]="RANDOM;20;90"
unit[3]="%"
group[3]="System"
name[4]="Disk Usage"
type[4]="generic_data"
description[4]="% used space"
values[4]="RANDOM;50;60"
unit[4]="%"
group[4]="System"
name[5]="Memory Usage"
type[5]="generic_data"
description[5]="% Used memory"
values[5]="RANDOM;0;20"
unit[5]="%"
group[5]="System"
name[6]="Service httpd"
type[6]="generic_proc"
values[6]="PROC;5"
group[6]="Applications"
name[7]="Service mysqld"
type[7]="generic_proc"
values[7]="PROC;5"
group[7]="Applications"
name[8]="Service sshd"
type[8]="generic_proc"
values[8]="PROC;5"
group[8]="Applications"

View File

@ -0,0 +1,73 @@
[agent_data]
agents_number="1"
agent_name="freebsd"
agent_alias="freebsd"
group="Demo servers"
address_network="192.168.4.0/24"
os_name="BSD"
os_versions[]="14.0"
os_versions[]="13.1"
os_versions[]="13.2"
os_versions[]="13.3"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="Network Usage"
type[1]="generic_data_inc"
description[1]="Network usage in the system"
values[1]="RANDOM;0;10000"
unit[1]="bytes/sec"
group[1]="Network"
name[2]="Network latency"
type[2]="generic_data"
description[2]="Network latency to router"
values[2]="RANDOM;0;20"
unit[2]="msec"
group[2]="Network"
name[3]="CPU Load"
type[3]="generic_data"
description[3]="CPU Usage"
values[3]="RANDOM;20;90"
unit[3]="%"
group[3]="System"
name[4]="Disk Usage"
type[4]="generic_data"
description[4]="% used space"
values[4]="RANDOM;50;60"
unit[4]="%"
group[4]="System"
name[5]="Memory Usage"
type[5]="generic_data"
description[5]="% Used memory"
values[5]="RANDOM;0;20"
unit[5]="%"
group[5]="System"
name[6]="Service httpd"
type[6]="generic_proc"
values[6]="PROC;5"
group[6]="Applications"
name[7]="Service mysqld"
type[7]="generic_proc"
values[7]="PROC;5"
group[7]="Applications"
name[8]="Service sshd"
type[8]="generic_proc"
values[8]="PROC;5"
group[8]="Applications"

View File

@ -0,0 +1,297 @@
[agent_data]
agents_number="1"
agent_name="cisco"
agent_alias="cisco"
group="Demo network"
address_network="192.168.5.0/24"
mac="__randomMAC__"
os_name="Cisco"
os_versions[]="C9200L"
os_versions[]="C9300LM"
os_versions[]="C9600"
latitude="RANDOM;37;42"
longitude="RANDOM;-8;-1"
altitude="0"
[modules]
name[1]="CPU Usage (5 min avg)"
type[1]="generic_data"
description[1]="CPU Usage"
values[1]="RANDOM;20;90"
unit[1]="%"
group[1]="General"
name[2]="Big Buffer Misses"
type[2]="generic_data"
description[2]="Buffer misses"
values[2]="RANDOM;20;90"
unit[2]="%"
group[2]="General"
name[3]="Temperature"
type[3]="generic_data"
description[3]="System temp"
values[3]="RANDOM;20;30"
unit[3]="ºC"
group[3]="General"
name[4]="Host alive"
type[4]="generic_proc"
values[4]="PROC;5"
group[4]="Networking"
name[5]="Gi0/0_ifOperStatus"
type[5]="generic_proc"
description[5]="(MAC: _mac_ - Gi0/0_ifOperStatus)"
values[5]="PROC;5"
group[5]="Networking"
name[6]="Gi0/0_ifInOctets"
type[6]="generic_data_inc"
description[6]="(MAC: _mac_ - Gi0/0_ifInOctets)"
values[6]="RANDOM;0;1000"
unit[6]="bytes/s"
group[6]="Networking"
name[7]="Gi0/0_ifOutOctets"
type[7]="generic_data_inc"
description[7]="(MAC: _mac_ - Gi0/0_ifOutOctets)"
values[7]="RANDOM;0;1000"
unit[7]="bytes/s"
group[7]="Networking"
name[8]="Gi0/1_ifOperStatus"
type[8]="generic_proc"
description[8]="(MAC: _mac_ - Gi0/1_ifOperStatus)"
values[8]="PROC;5"
group[8]="Networking"
name[9]="Gi0/1_ifInOctets"
type[9]="generic_data_inc"
description[9]="(MAC: _mac_ - Gi0/1_ifInOctets)"
values[9]="RANDOM;0;1000"
unit[9]="bytes/s"
group[9]="Networking"
name[10]="Gi0/1_ifOutOctets"
type[10]="generic_data_inc"
description[10]="(MAC: _mac_ - Gi0/1_ifOutOctets)"
values[10]="RANDOM;0;1000"
unit[10]="bytes/s"
group[10]="Networking"
name[11]="Gi0/2_ifOperStatus"
type[11]="generic_proc"
description[11]="(MAC: _mac_ - Gi0/2_ifOperStatus)"
values[11]="PROC;5"
group[11]="Networking"
name[12]="Gi0/2_ifInOctets"
type[12]="generic_data_inc"
description[12]="(MAC: _mac_ - Gi0/2_ifInOctets)"
values[12]="RANDOM;0;1000"
unit[12]="bytes/s"
group[12]="Networking"
name[13]="Gi0/2_ifOutOctets"
type[13]="generic_data_inc"
description[13]="(MAC: _mac_ - Gi0/2_ifOutOctets)"
values[13]="RANDOM;0;1000"
unit[13]="bytes/s"
group[13]="Networking"
name[14]="Gi0/3_ifOperStatus"
type[14]="generic_proc"
description[14]="(MAC: _mac_ - Gi0/3_ifOperStatus)"
values[14]="PROC;5"
group[14]="Networking"
name[15]="Gi0/3_ifInOctets"
type[15]="generic_data_inc"
description[15]="(MAC: _mac_ - Gi0/3_ifInOctets)"
values[15]="RANDOM;0;1000"
unit[15]="bytes/s"
group[15]="Networking"
name[16]="Gi0/3_ifOutOctets"
type[16]="generic_data_inc"
description[16]="(MAC: _mac_ - Gi0/3_ifOutOctets)"
values[16]="RANDOM;0;1000"
unit[16]="bytes/s"
group[16]="Networking"
name[17]="Gi0/4_ifOperStatus"
type[17]="generic_proc"
description[17]="(MAC: _mac_ - Gi0/4_ifOperStatus)"
values[17]="PROC;5"
group[17]="Networking"
name[18]="Gi0/4_ifInOctets"
type[18]="generic_data_inc"
description[18]="(MAC: _mac_ - Gi0/4_ifInOctets)"
values[18]="RANDOM;0;1000"
unit[18]="bytes/s"
group[18]="Networking"
name[19]="Gi0/4_ifOutOctets"
type[19]="generic_data_inc"
description[19]="(MAC: _mac_ - Gi0/4_ifOutOctets)"
values[19]="RANDOM;0;1000"
unit[19]="bytes/s"
group[19]="Networking"
name[20]="Gi0/5_ifOperStatus"
type[20]="generic_proc"
description[20]="(MAC: _mac_ - Gi0/5_ifOperStatus)"
values[20]="PROC;5"
group[20]="Networking"
name[21]="Gi0/5_ifInOctets"
type[21]="generic_data_inc"
description[21]="(MAC: _mac_ - Gi0/5_ifInOctets)"
values[21]="RANDOM;0;1000"
unit[21]="bytes/s"
group[21]="Networking"
name[22]="Gi0/5_ifOutOctets"
type[22]="generic_data_inc"
description[22]="(MAC: _mac_ - Gi0/5_ifOutOctets)"
values[22]="RANDOM;0;1000"
unit[22]="bytes/s"
group[22]="Networking"
name[23]="Gi0/6_ifOperStatus"
type[23]="generic_proc"
description[23]="(MAC: _mac_ - Gi0/6_ifOperStatus)"
values[23]="PROC;5"
group[23]="Networking"
name[24]="Gi0/6_ifInOctets"
type[24]="generic_data_inc"
description[24]="(MAC: _mac_ - Gi0/6_ifInOctets)"
values[24]="RANDOM;0;1000"
unit[24]="bytes/s"
group[24]="Networking"
name[25]="Gi0/6_ifOutOctets"
type[25]="generic_data_inc"
description[25]="(MAC: _mac_ - Gi0/6_ifOutOctets)"
values[25]="RANDOM;0;1000"
unit[25]="bytes/s"
group[25]="Networking"
name[26]="Gi0/7_ifOperStatus"
type[26]="generic_proc"
description[26]="(MAC: _mac_ - Gi0/7_ifOperStatus)"
values[26]="PROC;5"
group[26]="Networking"
name[27]="Gi0/7_ifInOctets"
type[27]="generic_data_inc"
description[27]="(MAC: _mac_ - Gi0/7_ifInOctets)"
values[27]="RANDOM;0;1000"
unit[27]="bytes/s"
group[27]="Networking"
name[28]="Gi0/7_ifOutOctets"
type[28]="generic_data_inc"
description[28]="(MAC: _mac_ - Gi0/7_ifOutOctets)"
values[28]="RANDOM;0;1000"
unit[28]="bytes/s"
group[28]="Networking"
name[29]="Gi0/8_ifOperStatus"
type[29]="generic_proc"
description[29]="(MAC: _mac_ - Gi0/8_ifOperStatus)"
values[29]="PROC;5"
group[29]="Networking"
name[30]="Gi0/8_ifInOctets"
type[30]="generic_data_inc"
description[30]="(MAC: _mac_ - Gi0/8_ifInOctets)"
values[30]="RANDOM;0;1000"
unit[30]="bytes/s"
group[30]="Networking"
name[31]="Gi0/8_ifOutOctets"
type[31]="generic_data_inc"
description[31]="(MAC: _mac_ - Gi0/8_ifOutOctets)"
values[31]="RANDOM;0;1000"
unit[31]="bytes/s"
group[31]="Networking"
name[32]="Gi0/9_ifOperStatus"
type[32]="generic_proc"
description[32]="(MAC: _mac_ - Gi0/9_ifOperStatus)"
values[32]="PROC;5"
group[32]="Networking"
name[33]="Gi0/9_ifInOctets"
type[33]="generic_data_inc"
description[33]="(MAC: _mac_ - Gi0/9_ifInOctets)"
values[33]="RANDOM;0;1000"
unit[33]="bytes/s"
group[33]="Networking"
name[34]="Gi0/9_ifOutOctets"
type[34]="generic_data_inc"
description[34]="(MAC: _mac_ - Gi0/9_ifOutOctets)"
values[34]="RANDOM;0;1000"
unit[34]="bytes/s"
group[34]="Networking"
name[35]="ipInReceives"
type[35]="generic_data"
description[35]="The total number of input datagrams received from interfaces"
values[35]="RANDOM;0;1000"
unit[35]="datagrams"
group[35]="Networking"
name[36]="ipOutRequests"
type[36]="generic_data"
description[36]="The total number of output datagrams requested from interfaces"
values[36]="RANDOM;0;1000"
unit[36]="datagrams"
group[36]="Networking"
name[37]="Latency"
type[37]="generic_data"
description[37]="Network latency"
values[37]="RANDOM;0;100"
unit[37]="msec"
group[37]="Networking"
[traps]
oid[1]=".1.3.6.1.4.1.9.9.41.1.2.3.1.2.0"
value[1]="RANDOM;0;100"
snmp_type[1]="6"
chance_percent[1]="20"
oid[2]=".1.3.6.1.4.1.9.9.41.1.2.3.1.3.0"
value[2]="RANDOM;0;100"
snmp_type[2]="6"
chance_percent[2]="20"
oid[3]=".1.3.6.1.4.1.9.9.41.1.2.3.1.4.0"
value[3]="RANDOM;0;100"
snmp_type[3]="6"
chance_percent[3]="20"
oid[4]=".1.3.6.1.4.1.9.9.41.1.2.3.1.5.0"
value[4]="RANDOM;0;100"
snmp_type[4]="6"
chance_percent[4]="20"
oid[5]=".1.3.6.1.4.1.9.9.41.1.2.3.1.6.0"
value[5]="RANDOM;0;100"
snmp_type[5]="6"
chance_percent[5]="20"

View File

@ -0,0 +1,65 @@
[dashboard_data]
name="Demo dashboard"
group="Demo dashboard"
[dashboard_items]
title[1]="Groups status"
type[1]="system_group_status"
x[1]="0"
y[1]="0"
width[1]="5"
height[1]="4"
title[2]="Network map"
type[2]="network_map"
x[2]="5"
y[2]="0"
width[2]="7"
height[2]="6"
map_name[2]="Demo sunburst network map"
title[3]="Module histogram"
type[3]="graph_module_histogram"
x[3]="0"
y[3]="4"
width[3]="5"
height[3]="2"
agent_name[3]="demo-global-agent-1"
module[3]="Host Alive"
interval[3]="86400"
title[4]="List of latest events"
type[4]="events_list"
x[4]="0"
y[4]="6"
width[4]="12"
height[4]="5"
title[5]="Top N events by agent"
type[5]="top_n_events_by_group"
x[5]="6"
y[5]="11"
width[5]="6"
height[5]="8"
title[6]="Top N of agent modules"
type[6]="top_n"
x[6]="0"
y[6]="11"
width[6]="6"
height[6]="4"
agent_name[6]="cisco-.*"
module[6]=".*ifOutOctets"
interval[6]="86400"
title[7]="Top N of agent modules"
type[7]="top_n"
x[7]="0"
y[7]="15"
width[7]="6"
height[7]="4"
agent_name[7]="cisco-.*"
module[7]=".*ifInOctets"
interval[7]="86400"

View File

@ -0,0 +1,16 @@
[gis_data]
name="Demo GIS map"
group="Demo servers"
zoom_level="6"
initial_latitude="40"
initial_longitude="-3"
initial_altitude="0"
default_latitude="40"
default_longitude="-3"
default_altitude="0"
[gis_layers]
name[1]="Demo servers"
group[1]="Demo servers"

View File

@ -0,0 +1,21 @@
[graph_data]
name="Linux CPU Load"
group="Demo servers"
description="This is a demo custom graph for linux agents CPU Load"
type="s_area"
periodicity="86400"
[graph_items]
agent_name[1]="linux-1"
module[1]="CPU Load"
agent_name[2]="linux-2"
module[2]="CPU Load"
agent_name[3]="linux-3"
module[3]="CPU Load"
agent_name[4]="linux-4"
module[4]="CPU Load"

View File

@ -0,0 +1,21 @@
[graph_data]
name="Linux Disk Usage"
group="Demo servers"
description="This is a demo custom graph for linux agents Disk Usage"
type="line"
periodicity="86400"
[graph_items]
agent_name[1]="linux-1"
module[1]="Disk Usage"
agent_name[2]="linux-2"
module[2]="Disk Usage"
agent_name[3]="linux-3"
module[3]="Disk Usage"
agent_name[4]="linux-4"
module[4]="Disk Usage"

View File

@ -0,0 +1,27 @@
[graph_data]
name="Network Usage"
group="Demo servers"
description="This is a demo custom graph for linux and windows agents Network Usage"
type="s_area"
periodicity="86400"
[graph_items]
agent_name[1]="linux-1"
module[1]="Network Usage"
agent_name[2]="linux-2"
module[2]="Network Usage"
agent_name[3]="linux-3"
module[3]="Network Usage"
agent_name[4]="linux-4"
module[4]="Network Usage"
agent_name[5]="windows-1"
module[5]="Network Usage"
agent_name[6]="windows-2"
module[6]="Network Usage"

View File

@ -0,0 +1,143 @@
[map_data]
name="Demo network map"
group="Demo network"
description="This is a demo network map"
node_radius="40"
generation_method="circular"
[map_items]
agent_name[1]="cisco-1"
x[1]="854"
y[1]="221"
agent_name[2]="freebsd-1"
x[2]="1184"
y[2]="-25"
parent[2]="1"
agent_name[3]="macos-1"
x[3]="1268"
y[3]="235"
parent[3]="1"
agent_name[4]="windows-1"
x[4]="528"
y[4]="-37"
parent[4]="1"
agent_name[5]="windows-2"
x[5]="514"
y[5]="389"
parent[5]="1"
agent_name[6]="linux-1"
x[6]="342"
y[6]="-273"
parent[6]="4"
agent_name[7]="linux-2"
x[7]="240"
y[7]="-7"
parent[7]="4"
agent_name[8]="linux-3"
x[8]="214"
y[8]="275"
parent[8]="5"
agent_name[9]="linux-4"
x[9]="226"
y[9]="595"
parent[9]="5"
agent_name[10]="cisco-2"
x[10]="1036"
y[10]="711"
parent[10]="1"
agent_name[11]="freebsd-2"
x[11]="892"
y[11]="-47"
parent[11]="1"
agent_name[12]="macos-2"
x[12]="1150"
y[12]="409"
parent[12]="1"
agent_name[13]="windows-3"
x[13]="686"
y[13]="875"
parent[13]="10"
agent_name[14]="windows-4"
x[14]="1452"
y[14]="847"
parent[14]="10"
agent_name[15]="linux-5"
x[15]="314"
y[15]="845"
parent[15]="13"
agent_name[16]="linux-6"
x[16]="474"
y[16]="1043"
parent[16]="13"
agent_name[17]="linux-7"
x[17]="1812"
y[17]="1011"
parent[17]="14"
agent_name[18]="linux-8"
x[18]="1828"
y[18]="723"
parent[18]="14"
agent_name[19]="cisco-3"
x[19]="1824"
y[19]="285"
parent[19]="3"
agent_name[20]="freebsd-3"
x[20]="-82"
y[20]="583"
parent[20]="9"
agent_name[21]="macos-3"
x[21]="-140"
y[21]="299"
parent[21]="20"
agent_name[22]="windows-5"
x[22]="-390"
y[22]="385"
parent[22]="20"
agent_name[23]="windows-6"
x[23]="-470"
y[23]="671"
parent[23]="20"
agent_name[24]="linux-9"
x[24]="-296"
y[24]="899"
parent[24]="20"
agent_name[25]="linux-10"
x[25]="-25"
y[25]="961"
parent[25]="20"
agent_name[26]="linux-11"
x[26]="1683"
y[26]="13"
parent[26]="19"
agent_name[27]="linux-12"
x[27]="2135"
y[27]="51"
parent[27]="19"

View File

@ -0,0 +1,9 @@
[map_data]
name="Demo sunburst network map"
group="Demo servers"
description="This is a demo sunburst network map"
node_radius="40"
generation_method="radial_dynamic"
[map_items]

View File

@ -0,0 +1,84 @@
[report_data]
name="Linux report"
group="Demo servers"
description="This is a demo report for linux agents"
[report_items]
name[1]="Linux CPU Load graph"
type[1]="custom_graph"
graph_name[1]="Linux CPU Load"
periodicity[1]="86400"
name[2]="linux-1 httpd"
type[2]="SLA"
agent_name[2]="linux-1"
module[2]="Service httpd"
periodicity[2]="86400"
name[3]="linux-1 mysqld"
type[3]="SLA"
agent_name[3]="linux-1"
module[3]="Service mysqld"
periodicity[3]="86400"
name[4]="linux-1 CPU Load graph"
type[4]="simple_graph"
agent_name[4]="linux-1"
module[4]="CPU Load"
periodicity[4]="86400"
name[5]="linux-2 httpd"
type[5]="SLA"
agent_name[5]="linux-2"
module[5]="Service httpd"
periodicity[5]="86400"
name[6]="linux-2 mysqld"
type[6]="SLA"
agent_name[6]="linux-2"
module[6]="Service mysqld"
periodicity[6]="86400"
name[7]="linux-2 CPU Load graph"
type[7]="simple_graph"
agent_name[7]="linux-2"
module[7]="CPU Load"
periodicity[7]="86400"
name[8]="linux-3 httpd"
type[8]="SLA"
agent_name[8]="linux-3"
module[8]="Service httpd"
periodicity[8]="86400"
name[9]="linux-3 mysqld"
type[9]="SLA"
agent_name[9]="linux-3"
module[9]="Service mysqld"
periodicity[9]="86400"
name[10]="linux-3 CPU Load graph"
type[10]="simple_graph"
agent_name[10]="linux-3"
module[10]="CPU Load"
periodicity[10]="86400"
name[11]="linux-4 httpd"
type[11]="SLA"
agent_name[11]="linux-4"
module[11]="Service httpd"
periodicity[11]="86400"
name[12]="linux-4 mysqld"
type[12]="SLA"
agent_name[12]="linux-4"
module[12]="Service mysqld"
periodicity[12]="86400"
name[13]="linux-4 CPU Load graph"
type[13]="simple_graph"
agent_name[13]="linux-4"
module[13]="CPU Load"
periodicity[13]="86400"

View File

@ -0,0 +1,26 @@
[service_data]
name="MySQL service"
group="Demo services"
description="This is a demo service for MySQL"
mode="smart"
critical="50"
warning="30"
[service_items]
type[1]="module"
agent_name[1]="linux-1"
module[1]="Service mysqld"
type[2]="module"
agent_name[2]="linux-2"
module[2]="Service mysqld"
type[3]="module"
agent_name[3]="linux-3"
module[3]="Service mysqld"
type[4]="module"
agent_name[4]="linux-4"
module[4]="Service mysqld"

View File

@ -0,0 +1,26 @@
[service_data]
name="HTTP service"
group="Demo services"
description="This is a demo service for HTTP"
mode="smart"
critical="50"
warning="30"
[service_items]
type[1]="module"
agent_name[1]="linux-1"
module[1]="Service httpd"
type[2]="module"
agent_name[2]="linux-2"
module[2]="Service httpd"
type[3]="module"
agent_name[3]="linux-3"
module[3]="Service httpd"
type[4]="module"
agent_name[4]="linux-4"
module[4]="Service httpd"

View File

@ -0,0 +1,16 @@
[service_data]
name="Web cluster service"
group="Demo services"
description="This is a demo service for a clustered web"
mode="smart"
critical="50"
warning="50"
[service_items]
type[1]="service"
service_name[1]="MySQL service"
type[2]="service"
service_name[2]="HTTP service"

View File

@ -0,0 +1,509 @@
[visual_console_data]
name="Cisco visual console"
group="Demo network"
background_color="#000000"
width="1680"
height="945"
[visual_console_items]
type[1]="box"
width[1]="720"
height[1]="290"
x[1]="100"
y[1]="20"
border_color[1]="#cacab3"
fill_color[1]="#cacab3"
type[2]="box"
width[2]="720"
height[2]="290"
x[2]="860"
y[2]="20"
border_color[2]="#cacab3"
fill_color[2]="#cacab3"
type[3]="box"
width[3]="266"
height[3]="150"
x[3]="100"
y[3]="362"
border_color[3]="#352e28"
fill_color[3]="#352e28"
type[4]="box"
width[4]="266"
height[4]="150"
x[4]="403"
y[4]="362"
border_color[4]="#352e28"
fill_color[4]="#352e28"
type[5]="box"
width[5]="266"
height[5]="150"
x[5]="708"
y[5]="362"
border_color[5]="#352e28"
fill_color[5]="#352e28"
type[6]="box"
width[6]="266"
height[6]="150"
x[6]="1013"
y[6]="362"
border_color[6]="#352e28"
fill_color[6]="#352e28"
type[7]="box"
width[7]="266"
height[7]="150"
x[7]="1313"
y[7]="362"
border_color[7]="#352e28"
fill_color[7]="#352e28"
type[8]="box"
width[8]="460"
height[8]="362"
x[8]="100"
y[8]="564"
border_color[8]="#b3cdc1"
fill_color[8]="#b3cdc1"
type[9]="box"
width[9]="460"
height[9]="362"
x[9]="1115"
y[9]="557"
border_color[9]="#b3cdc1"
fill_color[9]="#b3cdc1"
type[10]="label"
label_position[10]="down"
width[10]="0"
height[10]="20"
x[10]="135"
y[10]="50"
label[10]='<p><span style="font-size: 26px; color: #181818; line-height: 1em;">CPU Usage</span></p>'
show_on_top[10]=true
type[11]="label"
label_position[11]="down"
width[11]="0"
height[11]="20"
x[11]="895"
y[11]="50"
label[11]='<p><span style="font-size: 26px; color: #181818; line-height: 1em;">Ping / Latency</span></p>'
show_on_top[11]=true
type[12]="label"
label_position[12]="down"
width[12]="0"
height[12]="20"
x[12]="135"
y[12]="382"
label[12]='<p><span style="font-size: 22px; color: #ffffff; line-height: 1.3em;"><strong>Gi0/0 InOctets</strong></span></p>'
show_on_top[12]=true
type[13]="label"
label_position[13]="down"
width[13]="0"
height[13]="20"
x[13]="438"
y[13]="382"
label[13]='<p><span style="font-size: 22px; color: #ffffff; line-height: 1.3em;"><strong>Gi0/1 InOctets</strong></span></p>'
show_on_top[13]=true
type[14]="label"
label_position[14]="down"
width[14]="0"
height[14]="20"
x[14]="743"
y[14]="382"
label[14]='<p><span style="font-size: 22px; color: #ffffff; line-height: 1.3em;"><strong>Gi0/2 InOctets</strong></span></p>'
show_on_top[14]=true
type[15]="label"
label_position[15]="down"
width[15]="0"
height[15]="20"
x[15]="1048"
y[15]="382"
label[15]='<p><span style="font-size: 22px; color: #ffffff; line-height: 1.3em;"><strong>Gi0/3 InOctets</strong></span></p>'
show_on_top[15]=true
type[16]="label"
label_position[16]="down"
width[16]="0"
height[16]="20"
x[16]="1349"
y[16]="382"
label[16]='<p><span style="font-size: 22px; color: #ffffff; line-height: 1.3em;"><strong>Gi0/4 InOctets</strong></span></p>'
show_on_top[16]=true
type[17]="label"
label_position[17]="down"
width[17]="100"
height[17]="15"
x[17]="126"
y[17]="573"
label[17]='<p><span style="font-size: 16px; color: #181818; line-height: 1em;">Min</span></p>'
show_on_top[17]=true
type[18]="label"
label_position[18]="down"
width[18]="100"
height[18]="15"
x[18]="126"
y[18]="640"
label[18]='<p><span style="font-size: 16px; color: #181818; line-height: 1em;">Max</span></p>'
show_on_top[18]=true
type[19]="label"
label_position[19]="down"
width[19]="100"
height[19]="15"
x[19]="1137"
y[19]="564"
label[19]='<p><span style="font-size: 16px; color: #181818; line-height: 1em;">Min</span></p>'
show_on_top[19]=true
type[20]="label"
label_position[20]="down"
width[20]="100"
height[20]="15"
x[20]="1137"
y[20]="626"
label[20]='<p><span style="font-size: 16px; color: #181818; line-height: 1em;">Max</span></p>'
show_on_top[20]=true
type[21]="value"
label_position[21]="down"
width[21]="0"
height[21]="20"
x[21]="609"
y[21]="50"
label[21]='<p style="text-align: right;"><span style="font-size: 16px; color: #181818; line-height: 1em;">Avg. last 24 hours: (_value_)</span></p>'
show_on_top[21]=true
agent_name[21]="cisco-1"
module[21]="CPU Usage (5 min avg)"
process[21]="avg"
interval[21]="86400"
type[22]="value"
label_position[22]="down"
width[22]="0"
height[22]="20"
x[22]="135"
y[22]="96"
label[22]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_) </span></p>'
show_on_top[22]=true
agent_name[22]="cisco-1"
module[22]="CPU Usage (5 min avg)"
type[23]="value"
label_position[23]="down"
width[23]="0"
height[23]="20"
x[23]="1364"
y[23]="50"
label[23]='<p style="text-align: right;"><span style="font-size: 16px; color: #181818; line-height: 1em;">Avg. last 24 hours: (_value_)</span></p>'
show_on_top[23]=true
agent_name[23]="cisco-1"
module[23]="Latency"
process[23]="avg"
interval[23]="86400"
type[24]="value"
label_position[24]="down"
width[24]="0"
height[24]="20"
x[24]="895"
y[24]="96"
label[24]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_)</span></p>'
show_on_top[24]=true
agent_name[24]="cisco-1"
module[24]="Latency"
type[25]="value"
label_position[25]="down"
width[25]="0"
height[25]="20"
x[25]="135"
y[25]="472"
label[25]='<p style="text-align: right;"><span style="font-size: 16px; color: #cccccc; line-height: 1em;">Avg. last 24 hours (_value_)</span></p>'
show_on_top[25]=true
agent_name[25]="cisco-1"
module[25]="Gi0/0_ifInOctets"
process[25]="avg"
interval[25]="86400"
type[26]="value"
label_position[26]="down"
width[26]="0"
height[26]="20"
x[26]="135"
y[26]="417"
label[26]='<p><span style="font-size: 32px; color: #ffffff; line-height: 1em;">(_value_) </span></p>'
show_on_top[26]=true
agent_name[26]="cisco-1"
module[26]="Gi0/0_ifInOctets"
type[27]="value"
label_position[27]="down"
width[27]="0"
height[27]="20"
x[27]="438"
y[27]="472"
label[27]='<p style="text-align: right;"><span style="font-size: 16px; color: #cccccc; line-height: 1em;">Avg. last 24 hours (_value_)</span></p>'
show_on_top[27]=true
agent_name[27]="cisco-1"
module[27]="Gi0/1_ifInOctets"
process[27]="avg"
interval[27]="86400"
type[28]="value"
label_position[28]="down"
width[28]="0"
height[28]="20"
x[28]="438"
y[28]="417"
label[28]='<p><span style="font-size: 32px; color: #ffffff; line-height: 1em;">(_value_) </span></p>'
show_on_top[28]=true
agent_name[28]="cisco-1"
module[28]="Gi0/1_ifInOctets"
type[29]="value"
label_position[29]="down"
width[29]="0"
height[29]="20"
x[29]="743"
y[29]="472"
label[29]='<p style="text-align: right;"><span style="font-size: 16px; color: #cccccc; line-height: 1em;">Avg. last 24 hours (_value_)</span></p>'
show_on_top[29]=true
agent_name[29]="cisco-1"
module[29]="Gi0/2_ifInOctets"
process[29]="avg"
interval[29]="86400"
type[30]="value"
label_position[30]="down"
width[30]="0"
height[30]="20"
x[30]="743"
y[30]="417"
label[30]='<p><span style="font-size: 32px; color: #ffffff; line-height: 1em;">(_value_) </span></p>'
show_on_top[30]=true
agent_name[30]="cisco-1"
module[30]="Gi0/2_ifInOctets"
type[31]="value"
label_position[31]="down"
width[31]="0"
height[31]="20"
x[31]="1048"
y[31]="472"
label[31]='<p style="text-align: right;"><span style="font-size: 16px; color: #cccccc; line-height: 1em;">Avg. last 24 hours (_value_)</span></p>'
show_on_top[31]=true
agent_name[31]="cisco-1"
module[31]="Gi0/3_ifInOctets"
process[31]="avg"
interval[31]="86400"
type[32]="value"
label_position[32]="down"
width[32]="0"
height[32]="20"
x[32]="1048"
y[32]="417"
label[32]='<p><span style="font-size: 32px; color: #ffffff; line-height: 1em;">(_value_) </span></p>'
show_on_top[32]=true
agent_name[32]="cisco-1"
module[32]="Gi0/3_ifInOctets"
type[33]="value"
label_position[33]="down"
width[33]="0"
height[33]="20"
x[33]="1349"
y[33]="472"
label[33]='<p style="text-align: right;"><span style="font-size: 16px; color: #cccccc; line-height: 1em;">Avg. last 24 hours (_value_)</span></p>'
show_on_top[33]=true
agent_name[33]="cisco-1"
module[33]="Gi0/4_ifInOctets"
process[33]="avg"
interval[33]="86400"
type[34]="value"
label_position[34]="down"
width[34]="0"
height[34]="20"
x[34]="1349"
y[34]="417"
label[34]='<p><span style="font-size: 32px; color: #ffffff; line-height: 1em;">(_value_) </span></p>'
show_on_top[34]=true
agent_name[34]="cisco-1"
module[34]="Gi0/4_ifInOctets"
type[35]="value"
label_position[35]="down"
width[35]="0"
height[35]="20"
x[35]="124"
y[35]="602"
label[35]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_)</span></p>'
show_on_top[35]=true
agent_name[35]="cisco-1"
module[35]=ipInReceives
process[35]="min"
interval[35]="86400"
type[36]="value"
label_position[36]="down"
width[36]="0"
height[36]="20"
x[36]="124"
y[36]="669"
label[36]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_)</span></p>'
show_on_top[36]=true
agent_name[36]="cisco-1"
module[36]=ipInReceives
process[36]="max"
interval[36]="86400"
type[37]="value"
label_position[37]="down"
width[37]="0"
height[37]="20"
x[37]="1138"
y[37]="591"
label[37]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_)</span></p>'
show_on_top[37]=true
agent_name[37]="cisco-1"
module[37]=ipOutRequests
process[37]="min"
interval[37]="86400"
type[38]="value"
label_position[38]="down"
width[38]="0"
height[38]="20"
x[38]="1138"
y[38]="658"
label[38]='<p><span style="font-size: 50px; color: #181818; line-height: 1em;">(_value_)</span></p>'
show_on_top[38]=true
agent_name[38]="cisco-1"
module[38]=ipOutRequests
process[38]="max"
interval[38]="86400"
type[39]="static_image"
image[39]="dot"
width[39]="30"
height[39]="36"
x[39]="701"
y[39]="595"
label[39]='<p><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 18pt;">_module_</span></strong></span></p>'
label_position[39]="right"
agent_name[39]="cisco-1"
module[39]="Gi0/0_ifOperStatus"
type[40]="static_image"
image[40]="dot"
width[40]="30"
height[40]="36"
x[40]="701"
y[40]="655"
label[40]='<p><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 18pt;">_module_</span></strong></span></p>'
label_position[40]="right"
agent_name[40]="cisco-1"
module[40]="Gi0/1_ifOperStatus"
type[41]="static_image"
image[41]="dot"
width[41]="30"
height[41]="36"
x[41]="701"
y[41]="713"
label[41]='<p><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 18pt;">_module_</span></strong></span></p>'
label_position[41]="right"
agent_name[41]="cisco-1"
module[41]="Gi0/2_ifOperStatus"
type[42]="static_image"
image[42]="dot"
width[42]="30"
height[42]="36"
x[42]="701"
y[42]="771"
label[42]='<p><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 18pt;">_module_</span></strong></span></p>'
label_position[42]="right"
agent_name[42]="cisco-1"
module[42]="Gi0/3_ifOperStatus"
type[43]="static_image"
image[43]="dot"
width[43]="30"
height[43]="36"
x[43]="701"
y[43]="828"
label[43]='<p><span style="color: rgb(255, 255, 255);"><strong><span style="font-size: 18pt;">_module_</span></strong></span></p>'
label_position[43]="right"
agent_name[43]="cisco-1"
module[43]="Gi0/4_ifOperStatus"
type[44]="module_graph"
width[44]="652"
height[44]="110"
x[44]="135"
y[44]="166"
agent_name[44]="cisco-1"
module[44]="CPU Usage (5 min avg)"
image[44]="transparent"
graph_type[44]="area"
interval[44]="86400"
show_on_top[44]=true
type[45]="module_graph"
width[45]="295"
height[45]="87"
x[45]="895"
y[45]="189"
agent_name[45]="cisco-1"
module[45]="Host Alive"
image[45]="transparent"
graph_type[45]="area"
interval[45]="86400"
show_on_top[45]=true
type[46]="module_graph"
width[46]="295"
height[46]="87"
x[46]="1252"
y[46]="189"
agent_name[46]="cisco-1"
module[46]="Latency"
image[46]="transparent"
graph_type[46]="area"
interval[46]="86400"
show_on_top[46]=true
type[47]="odometer"
width[47]="412"
height[47]="11"
x[47]="123"
y[47]="719"
agent_name[47]="cisco-1"
module[47]="ipInReceives"
show_on_top[47]=true
type[48]="odometer"
width[48]="412"
height[48]="11"
x[48]="1142"
y[48]="710"
agent_name[48]="cisco-1"
module[48]="ipOutRequests"
show_on_top[48]=true

View File

@ -0,0 +1,295 @@
[visual_console_data]
name="Linux visual console"
group="Demo servers"
background_color="#f2f3f3"
width="1680"
height="945"
[visual_console_items]
type[1]="box"
width[1]="1205"
height[1]="560"
x[1]="30"
y[1]="30"
border_color[1]="#ffffff"
fill_color[1]="#ffffff"
type[2]="box"
width[2]="386"
height[2]="560"
x[2]="1264"
y[2]="30"
border_color[2]="#ffffff"
fill_color[2]="#ffffff"
type[3]="box"
width[3]="390"
height[3]="205"
x[3]="30"
y[3]="650"
border_color[3]="#eaf0ff"
fill_color[3]="#eaf0ff"
type[4]="box"
width[4]="390"
height[4]="205"
x[4]="441"
y[4]="650"
border_color[4]="#fef1ea"
fill_color[4]="#fef1ea"
type[5]="box"
width[5]="390"
height[5]="205"
x[5]="850"
y[5]="650"
border_color[5]="#d8daff"
fill_color[5]="#d8daff"
type[6]="box"
width[6]="390"
height[6]="205"
x[6]="1264"
y[6]="650"
border_color[6]="#d4edd7"
fill_color[6]="#d4edd7"
type[7]="label"
label_position[7]="down"
width[7]="239"
height[7]="20"
x[7]="60"
y[7]="60"
label[7]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">Network usage</span></p>'
show_on_top[7]=true
type[8]="label"
label_position[8]="down"
width[8]="239"
height[8]="20"
x[8]="1282"
y[8]="48"
label[8]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">Performance</span></p>'
show_on_top[8]=true
type[9]="label"
label_position[9]="down"
width[9]="239"
height[9]="20"
x[9]="60"
y[9]="680"
label[9]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">Service httpd</span></p>'
show_on_top[9]=true
type[10]="label"
label_position[10]="down"
width[10]="239"
height[10]="20"
x[10]="470"
y[10]="680"
label[10]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">CPU Load</span></p>'
show_on_top[10]=true
type[11]="label"
label_position[11]="down"
width[11]="239"
height[11]="20"
x[11]="880"
y[11]="680"
label[11]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">Memory usage</span></p>'
show_on_top[11]=true
type[12]="label"
label_position[12]="down"
width[12]="239"
height[12]="20"
x[12]="1294"
y[12]="680"
label[12]='<p><span style="font-size: 24px; color: #08122a; line-height: 1em; font-weight: 900;">Disk usage</span></p>'
show_on_top[12]=true
type[13]="label"
label_position[13]="down"
width[13]="181"
height[13]="16"
x[13]="63"
y[13]="158"
label[13]='<p><span style="font-size: 16px; color: #898989; line-height: 1em;">Min. today</span></p>'
show_on_top[13]=true
type[14]="label"
label_position[14]="down"
width[14]="181"
height[14]="16"
x[14]="469"
y[14]="158"
label[14]='<p><span style="font-size: 16px; color: #898989; line-height: 1em;">Avg. today</span></p>'
show_on_top[14]=true
type[15]="label"
label_position[15]="down"
width[15]="181"
height[15]="16"
x[15]="879"
y[15]="158"
label[15]='<p><span style="font-size: 16px; color: #898989; line-height: 1em;">Max. today</span></p>'
show_on_top[15]=true
type[16]="value"
label_position[16]="down"
width[16]="400"
height[16]="50"
x[16]="60"
y[16]="100"
label[16]='<p><span style="font-size: 50px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[16]=true
agent_name[16]="linux-1"
module[16]="Network Usage"
process[16]="min"
interval[16]="86400"
type[17]="value"
label_position[17]="down"
width[17]="400"
height[17]="50"
x[17]="468"
y[17]="100"
label[17]='<p><span style="font-size: 50px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[17]=true
agent_name[17]="linux-1"
module[17]="Network Usage"
process[17]="avg"
interval[17]="86400"
type[18]="value"
label_position[18]="down"
width[18]="400"
height[18]="50"
x[18]="876"
y[18]="100"
label[18]='<p><span style="font-size: 50px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[18]=true
agent_name[18]="linux-1"
module[18]="Network Usage"
process[18]="max"
interval[18]="86400"
type[19]="value"
label_position[19]="down"
width[19]="330"
height[19]="30"
x[19]="470"
y[19]="722"
label[19]='<p><span style="font-size: 40px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[19]=true
agent_name[19]="linux-1"
module[19]="CPU Load"
type[20]="value"
label_position[20]="down"
width[20]="330"
height[20]="30"
x[20]="880"
y[20]="722"
label[20]='<p><span style="font-size: 40px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[20]=true
agent_name[20]="linux-1"
module[20]="Memory Usage"
type[21]="value"
label_position[21]="down"
width[21]="330"
height[21]="30"
x[21]="1294"
y[21]="722"
label[21]='<p><span style="font-size: 40px; color: #08122a; line-height: 1em;">(_value_)</span></p>'
show_on_top[21]=true
agent_name[21]="linux-1"
module[21]="Disk Usage"
type[22]="percentile"
width[22]="330"
height[22]="100"
x[22]="470"
y[22]="790"
show_on_top[22]=true
agent_name[22]="linux-1"
module[22]="CPU Load"
min[22]="0"
max[22]="100"
type[23]="percentile"
width[23]="330"
height[23]="100"
x[23]="880"
y[23]="790"
show_on_top[23]=true
agent_name[23]="linux-1"
module[23]="Memory Usage"
min[23]="0"
max[23]="100"
type[24]="percentile"
width[24]="330"
height[24]="100"
x[24]="1294"
y[24]="790"
show_on_top[24]=true
agent_name[24]="linux-1"
module[24]="Disk Usage"
min[24]="0"
max[24]="100"
type[25]="module_graph"
width[25]="1150"
height[25]="320"
x[25]="58"
y[25]="196"
agent_name[25]="linux-1"
module[25]="Network Usage"
image[25]="transparent"
graph_type[25]="line"
interval[25]="86400"
show_on_top[25]=true
type[26]="basic_chart"
width[26]="325"
height[26]="110"
x[26]="1294"
y[26]="100"
agent_name[26]="linux-1"
module[26]="CPU Load"
interval[26]="86400"
show_on_top[26]=true
type[27]="basic_chart"
width[27]="325"
height[27]="110"
x[27]="1294"
y[27]="268"
agent_name[27]="linux-1"
module[27]="Memory Usage"
interval[27]="86400"
show_on_top[27]=true
type[28]="basic_chart"
width[28]="325"
height[28]="110"
x[28]="1294"
y[28]="432"
agent_name[28]="linux-1"
module[28]="Disk Usage"
interval[28]="86400"
show_on_top[28]=true
type[29]="event_history"
width[29]="330"
height[29]="103"
x[29]="60"
y[29]="713"
show_on_top[29]=true
agent_name[29]="linux-1"
module[29]="Service httpd"
interval[29]="86400"

View File

@ -1,11 +1,11 @@
pandorafms.vmware=9959cc3e5cc6bfcfadd6d05b56d4a11b pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b
pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe
pandorafms.mssql=1cc215409741d19080269ffba112810e pandorafms.mssql=1cc215409741d19080269ffba112810e
pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6 pandorafms.oracle=abdfd7280f76276f696115cabdac731e
pandorafms.db2=122f2abff0ec1d668c35ee0911483021 pandorafms.db2=122f2abff0ec1d668c35ee0911483021
pandorafms.sap.deset=9bb72b7f7497a8b543f25cd71f96878f pandorafms.sap.deset=9bb72b7f7497a8b543f25cd71f96878f
pandorafms.gcp.ce=6743d39452f8e1ad85d0d56a30843973 pandorafms.gcp.ce=6743d39452f8e1ad85d0d56a30843973
pandorafms.aws.ec2=07416081f11d92a7d5d9441dabb5c5cb pandorafms.aws.ec2=07416081f11d92a7d5d9441dabb5c5cb
pandorafms.aws.s3=eff053a212ea112e2a37efd9debbe6a0 pandorafms.aws.s3=eff053a212ea112e2a37efd9debbe6a0
pandorafms.aws.rds=47d7b02019329e1698f96db4959f9516 pandorafms.aws.rds=47d7b02019329e1698f96db4959f9516
pandorafms.azure.mc=04a1072d1ece8583645ad88204fbeed3 pandorafms.azure.mc=04a1072d1ece8583645ad88204fbeed3

View File

@ -0,0 +1,18 @@
pandorafms.aws.ec2;Amazon EC2;cloud;1;pandorafms.aws.ec2.png;https://pandorafms.com/library/aws-ec2-discovery/
pandorafms.aws.rds;Amazon RDS;cloud;1;pandorafms.aws.rds.png;https://pandorafms.com/library/aws-rds-discovery/
pandorafms.aws.s3;Amazon S3;cloud;1;pandorafms.aws.s3.png;https://pandorafms.com/library/aws-s3-discovery/
pandorafms.azure.mc;Azure Microsoft Compute;cloud;1;pandorafms.azure.mc.png;https://pandorafms.com/library/aws-azure-discovery/
pandorafms.db2;DB2;app;1;pandorafms.db2.png;https://pandorafms.com/library/db2-discovery/
pandorafms.gcp.ce;Google Cloud Compute Engine;cloud;1;pandorafms.gcp.ce.png;https://pandorafms.com/library/google-cloud-discovery/
pandorafms.mssql;Microsoft SQL Server;app;1;pandorafms.mssql.png;https://pandorafms.com/library/mssql-discovery/
pandorafms.mysql;MySQL;app;1;pandorafms.mysql.png;https://pandorafms.com/library/mysql-discovery/
pandorafms.oracle;Oracle;app;1;pandorafms.oracle.png;https://pandorafms.com/library/oracle-discovery/
pandorafms.proxmox;Proxmox;app;0;pandorafms.proxmox.png;https://pandorafms.com/library/proxmox-discovery/
pandorafms.sap.deset;SAP R3 - Deset;app;1;pandorafms.sap.deset.png;https://pandorafms.com/library/sap-discovery/
pandorafms.vmware;VMware;app;1;pandorafms.vmware.png;https://pandorafms.com/library/vmware-discovery/
pandorafms.kubernetes;Kubernetes;app;1;pandorafms.kubernetes.png;https://pandorafms.com/library/kubernetes-discovery/
pandorafms.mongodb;MongoDB;app;1;pandorafms.mongodb.png;https://pandorafms.com/library/mongodb-discovery/
pandorafms.ovh;OVH;cloud;1;pandorafms.ovh.png;https://pandorafms.com/library/ovh-discovery/
pandorafms.vulnscan;Vulnerability Scanner;app;1;pandorafms.vulnscan.png;https://pandorafms.com/library/pandora-vulnerability-discovery/
pandorafms.postgresql;PostgreSQL;app;1;pandorafms.postgresql.png;https://pandorafms.com/library/postgresql-discovery/
pandorafms.xenserver;Xenserver;app;1;pandorafms.xenserver.png;https://pandorafms.com/library/xenserver-discovery/
1 pandorafms.aws.ec2 Amazon EC2 cloud 1 pandorafms.aws.ec2.png https://pandorafms.com/library/aws-ec2-discovery/
2 pandorafms.aws.rds Amazon RDS cloud 1 pandorafms.aws.rds.png https://pandorafms.com/library/aws-rds-discovery/
3 pandorafms.aws.s3 Amazon S3 cloud 1 pandorafms.aws.s3.png https://pandorafms.com/library/aws-s3-discovery/
4 pandorafms.azure.mc Azure Microsoft Compute cloud 1 pandorafms.azure.mc.png https://pandorafms.com/library/aws-azure-discovery/
5 pandorafms.db2 DB2 app 1 pandorafms.db2.png https://pandorafms.com/library/db2-discovery/
6 pandorafms.gcp.ce Google Cloud Compute Engine cloud 1 pandorafms.gcp.ce.png https://pandorafms.com/library/google-cloud-discovery/
7 pandorafms.mssql Microsoft SQL Server app 1 pandorafms.mssql.png https://pandorafms.com/library/mssql-discovery/
8 pandorafms.mysql MySQL app 1 pandorafms.mysql.png https://pandorafms.com/library/mysql-discovery/
9 pandorafms.oracle Oracle app 1 pandorafms.oracle.png https://pandorafms.com/library/oracle-discovery/
10 pandorafms.proxmox Proxmox app 0 pandorafms.proxmox.png https://pandorafms.com/library/proxmox-discovery/
11 pandorafms.sap.deset SAP R3 - Deset app 1 pandorafms.sap.deset.png https://pandorafms.com/library/sap-discovery/
12 pandorafms.vmware VMware app 1 pandorafms.vmware.png https://pandorafms.com/library/vmware-discovery/
13 pandorafms.kubernetes Kubernetes app 1 pandorafms.kubernetes.png https://pandorafms.com/library/kubernetes-discovery/
14 pandorafms.mongodb MongoDB app 1 pandorafms.mongodb.png https://pandorafms.com/library/mongodb-discovery/
15 pandorafms.ovh OVH cloud 1 pandorafms.ovh.png https://pandorafms.com/library/ovh-discovery/
16 pandorafms.vulnscan Vulnerability Scanner app 1 pandorafms.vulnscan.png https://pandorafms.com/library/pandora-vulnerability-discovery/
17 pandorafms.postgresql PostgreSQL app 1 pandorafms.postgresql.png https://pandorafms.com/library/postgresql-discovery/
18 pandorafms.xenserver Xenserver app 1 pandorafms.xenserver.png https://pandorafms.com/library/xenserver-discovery/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
START TRANSACTION;
CREATE TABLE IF NOT EXISTS `tmerge_error` (
`id` int(10) NOT NULL auto_increment,
`id_node` int(10) default 0,
`phase` int(10) default 0,
`step` int(10) default 0,
`msg` LONGTEXT default "",
`action` text default "",
`utimestamp` int(20) unsigned NOT NULL default 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
ALTER TABLE `tmerge_error` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
CREATE TABLE IF NOT EXISTS `tmerge_steps` (
`id` int(10) NOT NULL auto_increment,
`id_node` int(10) default 0,
`phase` int(10) default 0,
`total` int(10) default 0,
`step` int(10) default 0,
`debug` varchar(1024) default "",
`action` varchar(100) default "",
`affected` varchar(100) default "",
`query` mediumtext default "",
`utimestamp` int(20) unsigned NOT NULL default 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
ALTER TABLE `tmerge_steps` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
CREATE TABLE IF NOT EXISTS `tmerge_queries` (
`steps` int(10) NOT NULL auto_increment,
`action` varchar(100) default "",
`affected` varchar(100) default "",
`utimestamp` int(20) unsigned NOT NULL default 0,
`query` LONGTEXT NOT NULL default "",
PRIMARY KEY (`steps`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
ALTER TABLE `tmerge_queries` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
-- Update version for plugin oracle
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
ALTER TABLE `tevent_sound` MODIFY COLUMN `name` text NULL;
ALTER TABLE `tevent_sound` MODIFY COLUMN `sound` text NULL;
ALTER TABLE `treport_content` MODIFY COLUMN `use_prefix_notation` tinyint unsigned NOT NULL DEFAULT 1;
ALTER TABLE `treport_content_template` MODIFY COLUMN `use_prefix_notation` tinyint unsigned NOT NULL DEFAULT 1;
ALTER TABLE `tsesion_filter` MODIFY COLUMN `id_name` text NULL;
ALTER TABLE `tsesion_filter` MODIFY COLUMN `ip` text NULL;
ALTER TABLE `tsesion_filter` MODIFY COLUMN `type` text NULL;
ALTER TABLE `tsesion_filter` MODIFY COLUMN `user` text NULL;
ALTER TABLE `tncm_agent_data`
ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`;
ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ;
ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`;
UPDATE `tncm_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM vendors))), '"]'), `models` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM models))), '"]');
UPDATE `tncm_agent_data_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM vendors))), '"]'), `models` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM models))), '"]');
COMMIT;

View File

@ -35,7 +35,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$notifications_numbers['last_id'] $notifications_numbers['last_id']
).'</div>'; ).'</div>';
$header_welcome = ''; $header_welcome = '';
if (check_acl($config['id_user'], $group, 'AW')) { if (check_acl($config['id_user'], 0, 'AW')) {
$header_welcome .= '<div id="welcome-icon-header">'; $header_welcome .= '<div id="welcome-icon-header">';
$header_welcome .= html_print_image( $header_welcome .= html_print_image(
'images/wizard@svg.svg', 'images/wizard@svg.svg',
@ -100,9 +100,9 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
if ($check_minor_release_available === true) { if ($check_minor_release_available === true) {
if (users_is_admin($config['id_user'])) { if (users_is_admin($config['id_user'])) {
if ($config['language'] === 'es') { if ($config['language'] === 'es') {
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/es/documentation/02_installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s'); set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/es/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
} else { } else {
set_pandora_error_for_header('There are one or more minor releases waiting for update. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/en/documentation/02_installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('About minor release update').'</a>', 'minor release/s available'); set_pandora_error_for_header('There are one or more minor releases waiting for update. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/en/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('About minor release update').'</a>', 'minor release/s available');
} }
} }
} }
@ -235,6 +235,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$header_autorefresh = ''; $header_autorefresh = '';
$header_autorefresh_counter = ''; $header_autorefresh_counter = '';
$header_setup = '';
if (($_GET['sec2'] !== 'operation/visual_console/render_view')) { if (($_GET['sec2'] !== 'operation/visual_console/render_view')) {
if ($autorefresh_list !== null if ($autorefresh_list !== null
@ -352,7 +353,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$display_counter = 'display:none'; $display_counter = 'display:none';
} }
$header_setup = '';
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
$header_setup .= '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup&section=general').'">'; $header_setup .= '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup&section=general').'">';
$header_setup .= html_print_image( $header_setup .= html_print_image(
@ -397,21 +397,23 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>'; $modal_box .= '<a href="https://discord.com/invite/xVt2ruSxmr" target="_blank">'.__('Join discord community').'</a>';
$modal_box .= '</div>'; $modal_box .= '</div>';
$modal_help = html_print_div( if ($config['activate_feedback'] === '1') {
[ $modal_help = html_print_div(
'id' => 'modal-help-content', [
'content' => html_print_image( 'id' => 'modal-help-content',
'images/help@header.svg', 'content' => html_print_image(
true, 'images/help@header.svg',
[ true,
'title' => __('Help'), [
'class' => 'main_menu_icon bot invert_filter', 'title' => __('Help'),
'alt' => 'user', 'class' => 'main_menu_icon bot invert_filter',
] 'alt' => 'user',
).$modal_box, ]
], ).$modal_box,
true, ],
); true,
);
}
// User. // User.
@ -455,19 +457,28 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
); );
$header_logout .= '</a></div>'; $header_logout .= '</a></div>';
if (enterprise_installed()) {
$subtitle_header = $config['custom_subtitle_header'];
$class_header = '';
} else {
$subtitle_header = __('the Flexible Monitoring System (OpenSource version)');
echo '<div id="dialog_why_enterprise" class="invisible"></div>';
$class_header = 'underline-hover modal_module_list';
}
if (is_reporting_console_node() === true) { if (is_reporting_console_node() === true) {
echo '<div class="header_left">'; echo '<div class="header_left '.$class_header.'">';
echo '<span class="header_title">'; echo '<span class="header_title">';
echo $config['custom_title_header']; echo $config['custom_title_header'];
echo '</span>'; echo '</span>';
echo '<span class="header_subtitle">'; echo '<span class="header_subtitle">';
echo $config['custom_subtitle_header']; echo $subtitle_header;
echo '</span>'; echo '</span>';
echo '</div>'; echo '</div>';
echo '<div class="header_center"></div>'; echo '<div class="header_center"></div>';
echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>'; echo '<div class="header_right">'.$modal_help, $header_user, $header_logout.'</div>';
} else { } else {
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div> echo '<div class="header_left '.$class_header.'"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$subtitle_header.'</span></div>
<div class="header_center">'.$header_searchbar.'</div> <div class="header_center">'.$header_searchbar.'</div>
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_setup, $header_user, $header_logout.'</div>'; <div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $header_welcome, $servers_list, $modal_help, $header_setup, $header_user, $header_logout.'</div>';
} }
@ -916,6 +927,44 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$(document).ready (function () { $(document).ready (function () {
<?php if (enterprise_installed() === false) { ?>
$('.header_left').on('click', function(){
jQuery.post(
"ajax.php",
{
page: "include/functions_menu",
'why_enterprise': "true"
},
function(data) {
if (data) {
$("#dialog_why_enterprise").html(data);
// Open dialog
$("#dialog_why_enterprise").dialog({
resizable: false,
draggable: false,
modal: true,
show: {
effect: "fade",
duration: 200
},
hide: {
effect: "fade",
duration: 200
},
closeOnEscape: true,
width: 700,
height: 450,
close: function(){
$('#dialog_why_enterprise').html('');
}
});
}
},
"html"
);
});
<?php } ?>
// Check new notifications on a periodic way // Check new notifications on a periodic way
setInterval(check_new_notifications, 60000); setInterval(check_new_notifications, 60000);
@ -972,11 +1021,14 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
modal: { modal: {
title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>", title: "<?php echo __('Welcome to').' '.io_safe_output(get_product_name()); ?>",
cancel: '<?php echo __('Do not show anymore'); ?>', cancel: '<?php echo __('Do not show anymore'); ?>',
ok: '<?php echo __('Close'); ?>' ok: '<?php echo __('Close'); ?>',
overlay: true,
overlayExtraClass: 'welcome-overlay',
}, },
onshow: { onshow: {
page: 'include/ajax/welcome_window', page: 'include/ajax/welcome_window',
method: 'loadWelcomeWindow', method: 'loadWelcomeWindow',
width: 1000,
}, },
oncancel: { oncancel: {
page: 'include/ajax/welcome_window', page: 'include/ajax/welcome_window',
@ -994,6 +1046,34 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
} }
}) })
} }
},
onload: () => {
$(document).ready(function () {
var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix");
$(buttonpane).append(`
<div class="welcome-wizard-buttons">
<label>
<input type="checkbox" class="welcome-wizard-do-not-show" value="1" />
<?php echo __('Do not show anymore'); ?>
</label>
<button class="close-wizard-button"><?php echo __('Close wizard'); ?></button>
</div>
`);
var closeWizard = $("button.close-wizard-button");
$(closeWizard).click(function (e) {
var close = $("div[aria-describedby='welcome_modal_window'] button.sub.ok.submit-next.ui-button");
var cancel = $("div[aria-describedby='welcome_modal_window'] button.sub.upd.submit-cancel.ui-button");
var checkbox = $("div[aria-describedby='welcome_modal_window'] .welcome-wizard-do-not-show:checked").length;
if (checkbox === 1) {
$(cancel).click();
} else {
$(close).click()
}
});
});
} }
}); });
}); });

View File

@ -21,7 +21,7 @@ if (empty($custom_conf_enabled) === true || isset($config['custom_docs_url_alt']
if (isset($config['custom_docs_url_alt']) === true) { if (isset($config['custom_docs_url_alt']) === true) {
$docs_url = $config['custom_docs_url_alt']; $docs_url = $config['custom_docs_url_alt'];
} else { } else {
$docs_url = 'https://pandorafms.com/manual/en/documentation/02_installation/04_configuration'; $docs_url = 'https://pandorafms.com/manual/en/documentation/pandorafms/installation/04_configuration';
} }
} }

Some files were not shown because too many files have changed in this diff Show More