diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 371367239b..cdc9e46a3e 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,11 @@ +2012-04-24 Dario Rodriguez + + * win32/bin/pandora_agent.conf, + unix/Linux/pandora_agent.conf: Added more examples of modules enabled and + improved comments in config file for windows and linux. + + MERGED FROM 4.0.2 + 2012-04-23 Dario Rodriguez * win32/bin/pandora_agent.conf: Added "parent_agent_name" parameter diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index cacbbf781c..2dfa829dc3 100755 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -164,8 +164,13 @@ module_exec vmstat 1 2 | tail -1 | awk '{ print $13 }' module_max 100 module_min 0 module_description User CPU Usage (%) +module_min_warning 70 +module_max_warning 90 +module_min_critical 91 +module_max_critical 100 module_end +#Get load average module_begin module_name Load Average module_type generic_data @@ -173,6 +178,7 @@ module_exec cat /proc/loadavg | cut -d' ' -f1 module_description Average process in CPU (Last minute) module_end +# Get disk space free in MB module_begin module_name disk_root_free module_type generic_data @@ -180,14 +186,22 @@ module_exec df -kh / | tail -1 | awk '{ print 100-$5 }' module_max 100 module_min 0 module_description Free disk Percentage of root partition +module_min_warning 70 +module_max_warning 90 +module_min_critical 91 +module_max_critical 100 module_end - +#Get free memory in MB module_begin module_name memfree module_type generic_data module_exec free -m | grep buffers/cache | awk '{print $4}' module_description Free memory in MB +module_min_warning 500 +module_max_warning 600 +module_min_critical 100 +module_max_critical 499 module_end # This module uses postprocess feature to unit conversion @@ -199,11 +213,16 @@ module_postprocess 0,000976 module_description Used memory in KB postprocessed to be in MB module_end +#Count total number of processes module_begin module_name proctotal module_type generic_data module_exec ps -A | tail --lines=+5 | wc -l module_description Total processes +module_min_warning 600 +module_max_warning 799 +module_min_critical 800 +module_max_critical 1000 module_end # Process information @@ -212,6 +231,7 @@ module_begin module_name sshDaemon module_type generic_proc module_exec ps -Af | grep sshd | grep -v "grep" | wc -l +module_description Check ssh service module_end # Async data example @@ -220,10 +240,16 @@ module_begin module_name LastLogin module_type async_string module_exec last | head -1 -module_end +module_description Monitor last user loggin +module_end + # Plugin example +# This plugin detects all disk partitions and monitor the free spaces + +module_plugin pandora_df + # This parses /var/log/syslog file, under the module name "syslog" # And search for "ssh" string into it, sending only that information. @@ -232,3 +258,31 @@ module_plugin grep_log /var/log/syslog Syslog ssh # Plugin for inventory on the agent (Only Enterprise) # module_plugin inventory 1 cpu ram video nic hd cdrom software + +# Example of preconditions +#module_begin +#module_name Test Precondicion +#module_type generic_data +#module_precondition < 10 echo 5 +#module_precondition > 10 echo 15 +#module_precondition = 10 echo 10 +#module_precondition != 10 echo 5 +#module_precondition =~ 10 echo 10 +#module_precondition (5,15) echo 10 +#module_freepercentmemory +#module_description Precondition test module +#module_end + +# Example of postconditions +#module_begin +#module_name Test Postcondicion +#module_type generic_data +#module_condition < 10 echo min >> /tmp/log.txt +#module_condition > 3 echo max >> /tmp/log.txt +#module_condition = 5 echo equal >> /tmp/log.txt +#module_condition != 10 echo diff >> /tmp/log.txt +#module_condition =~ 5 echo regexp >> /tmp/log.txt +#module_condition (3,8) echo range >> /tmp/log.txt +#module_exec echo 5 +#module_description Postcondition test module +#module_end diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 8061aefff7..29f549ac10 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -106,20 +106,18 @@ xml_buffer 0 # Check online documentation and module library at http://pandorafms.org # ================= -# Sample of Windows inventory module (ONLY ENTERPRISE)! -#module_begin -#module_name Inventory -#module_interval 7 -#module_type generic_data_string -#module_inventory CPU RAM CDROM Video HD Patches Software Services NIC -#module_description Inventory -#module_end - -# Example plugin to retrieve last 5 min events in log4x format -# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\logevent_log4x.vbs" Aplicacion System 300 - -# Example plugin to retrieve drive usage -# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs" +# CPU Load using WMI +module_begin +module_name CPU Load +module_type generic_data +module_wmiquery SELECT LoadPercentage FROM Win32_Processor +module_wmicolumn LoadPercentage +module_description CPU Load (%) +module_min_warning 80 +module_max_warning 90 +module_min_critical 91 +module_max_critical 100 +module_end # Free space on disk C: (%) module_begin @@ -127,23 +125,35 @@ module_name FreeDiskC module_type generic_data module_freepercentdisk C: module_description Free space on drive C: (%) +module_min_warning 70 +module_max_warning 90 +module_min_critical 91 +module_max_critical 100 module_end -# Free space on disk D: (%) -# module_begin -# module_name FreeDiskD -# module_type generic_data -# module_freepercentdisk D: -# module_description Free space on drive D: (%) -# module_end +# Number processes +module_begin +module_name Number processes +module_type generic_data +module_exec tasklist | gawk "NR > 3 {print$0}" | wc -l +module_description Number of processes running +module_min_warning 600 +module_max_warning 799 +module_min_critical 800 +module_max_critical 1000 +module_end # Free space on disk C: (Total) -# module_begin -# module_name FreeDiskCTotal -# module_type generic_data -# module_freedisk C: -# module_description Free space on drive C: (Total) -# module_end +module_begin +module_name FreeDiskCTotal +module_type generic_data +module_freedisk C: +module_description Free space on drive C: (Total) +module_min_warning 501 +module_max_warning 700 +module_min_critical 300 +module_max_critical 500 +module_end # CPU usage percentage module_begin @@ -151,6 +161,10 @@ module_name CPUUse module_type generic_data module_cpuusage all module_description CPU# usage +module_min_warning 70 +module_max_warning 90 +module_min_critical 91 +module_max_critical 100 module_end # Free Memory @@ -158,7 +172,11 @@ module_begin module_name FreeMemory module_type generic_data module_freepercentmemory -module_description Amount of free memory. +module_description Free memory (%). +module_min_warning 30 +module_max_warning 21 +module_min_critical 0 +module_max_critical 20 module_end # Log events @@ -180,6 +198,39 @@ module_source Security module_eventcode 529 module_end +# Check if Dhcp service is enabled +module_begin +module_name DHCP Enabled +module_type generic_proc +module_service Dhcp +module_description Check DCHP service enabled +module_min_critical 0 +module_max_critical 1 +module_end + +# Example plugin to retrieve drive usage +module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs" + +# Free space on disk D: (%) +# module_begin +# module_name FreeDiskD +# module_type generic_data +# module_freepercentdisk D: +# module_description Free space on drive D: (%) +# module_end + +# Sample of Windows inventory module (ONLY ENTERPRISE)! +#module_begin +#module_name Inventory +#module_interval 7 +#module_type generic_data_string +#module_inventory CPU RAM CDROM Video HD Patches Software Services NIC +#module_description Inventory +#module_end + +# Example plugin to retrieve last 5 min events in log4x format +# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\logevent_log4x.vbs" Aplicacion System 300 + # Sample on how to get a value from registry # This returns the last time user launch microsoft Windows update #module_begin @@ -191,11 +242,14 @@ module_end # Example of a remote TCP check #module_begin -#module_name Tcp Sample check +#module_name Local TCP Port 80 #module_type generic_data -#module_tcpcheck www.google.com +#module_tcpcheck 127.0.0.1 #module_port 80 #module_timeout 5 +#module_description Check local port 80 +#module_min_critical 0 +#module_max_critical 1 #module_end # Example of regexp matching @@ -268,10 +322,28 @@ module_end # Example of preconditions #module_begin -#module_name Prueba Precondicion +#module_name Test Precondicion #module_type generic_data -#module_precondition < 10 type X:\fichero.txt | wc -l +#module_precondition < 10 cmd.exe /c echo 5 +#module_precondition > 10 cmd.exe /c echo 15 +#module_precondition = 10 cmd.exe /c echo 10 +#module_precondition != 10 cmd.exe /c echo 5 +#module_precondition =~ 10 cmd.exe /c echo 10 +#module_precondition (5,15) cmd.exe /c echo 10 #module_freepercentmemory -#module_description Amount of free memory. +#module_description Precondition test module #module_end +# Example of postconditions +#module_begin +#module_name Test Postcondicion +#module_type generic_data +#module_condition < 10 cmd.exe /c echo min >> c:\log.txt +#module_condition > 3 cmd.exe /c echo max >> c:\log.txt +#module_condition = 5 cmd.exe /c echo equal >> c:\log.txt +#module_condition != 10 cmd.exe /c echo diff >> c:\log.txt +#module_condition =~ 5 cmd.exe /c echo regexp >> c:\log.txt +#module_condition (3,8) cmd.exe /c echo range >> c:\log.txt +#module_exec echo 5 +#module_description Postcondition test module +#module_end \ No newline at end of file