diff --git a/pandora_console/extras/demodata/network_maps/1-networkmap.prd b/pandora_console/extras/demodata/network_maps/1-networkmap.prd index 7ef0db5db8..6a85d3625a 100644 --- a/pandora_console/extras/demodata/network_maps/1-networkmap.prd +++ b/pandora_console/extras/demodata/network_maps/1-networkmap.prd @@ -4,6 +4,7 @@ name="Demo network map" group="Demo network" description="This is a demo network map" node_radius="40" +generation_method="circular" [map_items] diff --git a/pandora_console/extras/demodata/network_maps/2-sunburst-networkmap.prd b/pandora_console/extras/demodata/network_maps/2-sunburst-networkmap.prd new file mode 100644 index 0000000000..4bdac3ce97 --- /dev/null +++ b/pandora_console/extras/demodata/network_maps/2-sunburst-networkmap.prd @@ -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] \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/4-sunburst-linux-service.prd b/pandora_console/extras/demodata/services/4-sunburst-linux-service.prd deleted file mode 100644 index b85adcef56..0000000000 --- a/pandora_console/extras/demodata/services/4-sunburst-linux-service.prd +++ /dev/null @@ -1,17 +0,0 @@ -[service_data] - -name="Linux service" -group="Demo services" -description="This is a demo sunburst service for linux agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="dynamic" -match[1]="agent" -group[1]="Demo servers" -regex[1]=true -agent_name[1]="linux" \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/5-sunburst-windows-service.prd b/pandora_console/extras/demodata/services/5-sunburst-windows-service.prd deleted file mode 100644 index cada189ddf..0000000000 --- a/pandora_console/extras/demodata/services/5-sunburst-windows-service.prd +++ /dev/null @@ -1,17 +0,0 @@ -[service_data] - -name="Windows service" -group="Demo services" -description="This is a demo sunburst service for windows agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="dynamic" -match[1]="agent" -group[1]="Demo servers" -regex[1]=true -agent_name[1]="windows" \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/6-sunburst-macos-service.prd b/pandora_console/extras/demodata/services/6-sunburst-macos-service.prd deleted file mode 100644 index 7344761920..0000000000 --- a/pandora_console/extras/demodata/services/6-sunburst-macos-service.prd +++ /dev/null @@ -1,17 +0,0 @@ -[service_data] - -name="MacOS service" -group="Demo services" -description="This is a demo sunburst service for macos agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="dynamic" -match[1]="agent" -group[1]="Demo servers" -regex[1]=true -agent_name[1]="macos" \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/7-sunburst-freebsd-service.prd b/pandora_console/extras/demodata/services/7-sunburst-freebsd-service.prd deleted file mode 100644 index c97828123b..0000000000 --- a/pandora_console/extras/demodata/services/7-sunburst-freebsd-service.prd +++ /dev/null @@ -1,17 +0,0 @@ -[service_data] - -name="FreeBSD service" -group="Demo services" -description="This is a demo sunburst service for freebsd agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="dynamic" -match[1]="agent" -group[1]="Demo servers" -regex[1]=true -agent_name[1]="freebsd" \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/8-sunburst-cisco-service.prd b/pandora_console/extras/demodata/services/8-sunburst-cisco-service.prd deleted file mode 100644 index 079c5231c3..0000000000 --- a/pandora_console/extras/demodata/services/8-sunburst-cisco-service.prd +++ /dev/null @@ -1,17 +0,0 @@ -[service_data] - -name="Cisco service" -group="Demo services" -description="This is a demo sunburst service for cisco agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="dynamic" -match[1]="agent" -group[1]="Demo servers" -regex[1]=true -agent_name[1]="cisco" \ No newline at end of file diff --git a/pandora_console/extras/demodata/services/9-sunburst-parent-service.prd b/pandora_console/extras/demodata/services/9-sunburst-parent-service.prd deleted file mode 100644 index 2e13575e63..0000000000 --- a/pandora_console/extras/demodata/services/9-sunburst-parent-service.prd +++ /dev/null @@ -1,26 +0,0 @@ -[service_data] - -name="Sunburst service" -group="Demo services" -description="This is a demo sunburst service for all agents" -mode="smart" -critical="50" -warning="30" -show_sunburst=true - -[service_items] - -type[1]="service" -service_name[1]="Linux service" - -type[2]="service" -service_name[2]="Windows service" - -type[3]="service" -service_name[3]="MacOS service" - -type[4]="service" -service_name[4]="FreeBSD service" - -type[5]="service" -service_name[5]="Cisco service" \ No newline at end of file diff --git a/pandora_console/extras/demodata/visual_consoles/1-cisco-visual-console.prd b/pandora_console/extras/demodata/visual_consoles/1-cisco-visual-console.prd new file mode 100644 index 0000000000..075f0ea051 --- /dev/null +++ b/pandora_console/extras/demodata/visual_consoles/1-cisco-visual-console.prd @@ -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]='
CPU Usage
' +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]='Ping / Latency
' +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]='Gi0/0 InOctets
' +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]='Gi0/1 InOctets
' +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]='Gi0/2 InOctets
' +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]='Gi0/3 InOctets
' +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]='Gi0/4 InOctets
' +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]='Min
' +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]='Max
' +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]='Min
' +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]='Max
' +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]='Avg. last 24 hours: (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours: (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours (_value_)
' +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]='(_value_)
' +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]='Avg. last 24 hours (_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='_module_
' +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]='_module_
' +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]='_module_
' +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]='_module_
' +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]='_module_
' +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 \ No newline at end of file diff --git a/pandora_console/extras/demodata/visual_consoles/1-linux-visual-console.prd b/pandora_console/extras/demodata/visual_consoles/1-linux-visual-console.prd deleted file mode 100644 index 299d2296ed..0000000000 --- a/pandora_console/extras/demodata/visual_consoles/1-linux-visual-console.prd +++ /dev/null @@ -1,150 +0,0 @@ -[visual_console_data] - -name="Linux visual console" -group="Demo servers" -background="blackabstract.jpg" -background_color="#ffffff" -width="1285" -height="768" - -[visual_console_items] - -type[1]="label" -label[1]='Security
' -label_position[1]="down" -x[1]="160" -y[1]="25" -width[1]="160" -height[1]="55" - -type[2]="label" -label[2]='Performance
' -label_position[2]="down" -x[2]="840" -y[2]="25" -width[2]="160" -height[2]="55" - -type[3]="label" -label[3]='Services
' -label_position[3]="down" -x[3]="170" -y[3]="400" -width[3]="160" -height[3]="55" - -type[4]="static_image" -image[4]="status" -agent_name[4]="linux-1" -module[4]="Antivirus Updated" -label[4]='_module_
' -label_position[4]="right" -x[4]="80" -y[4]="105" -width[4]="50" -height[4]="50" - -type[5]="static_image" -image[5]="status" -agent_name[5]="linux-1" -module[5]="Insecure passwords status" -label[5]='_module_
' -label_position[5]="right" -x[5]="80" -y[5]="165" -width[5]="50" -height[5]="50" - -type[6]="static_image" -image[6]="status" -agent_name[6]="linux-1" -module[6]="Files check status" -label[6]='_module_
' -label_position[6]="right" -x[6]="80" -y[6]="225" -width[6]="50" -height[6]="50" - -type[7]="static_image" -image[7]="status" -agent_name[7]="linux-1" -module[7]="Authorized ports status" -label[7]='_module_
' -label_position[7]="right" -x[7]="80" -y[7]="285" -width[7]="50" -height[7]="50" - -type[8]="static_image" -image[8]="status" -agent_name[8]="linux-1" -module[8]="Service httpd" -label[8]='_module_
' -label_position[8]="right" -x[8]="80" -y[8]="490" -width[8]="50" -height[8]="50" - -type[9]="static_image" -image[9]="status" -agent_name[9]="linux-1" -module[9]="Service mysqld" -label[9]='_module_
' -label_position[9]="right" -x[9]="80" -y[9]="550" -width[9]="50" -height[9]="50" - -type[10]="static_image" -image[10]="status" -agent_name[10]="linux-1" -module[10]="Service sshd" -label[10]='_module_
' -label_position[10]="right" -x[10]="80" -y[10]="610" -width[10]="50" -height[10]="50" - -type[11]="module_graph" -image[11]="black" -agent_name[11]="linux-1" -module[11]="CPU Load" -interval[11]="86400" -graph_type[11]="area" -label[11]="" -label_position[11]="down" -x[11]="625" -y[11]="100" -width[11]="600" -height[11]="180" - -type[12]="module_graph" -image[12]="black" -agent_name[12]="linux-1" -module[12]="Memory Usage" -interval[12]="86400" -graph_type[12]="area" -label[12]="" -label_position[12]="down" -x[12]="625" -y[12]="300" -width[12]="600" -height[12]="180" - -type[13]="module_graph" -image[13]="black" -agent_name[13]="linux-1" -module[13]="Disk Usage" -interval[13]="86400" -graph_type[13]="area" -label[13]="" -label_position[13]="down" -x[13]="625" -y[13]="500" -width[13]="600" -height[13]="180" \ No newline at end of file diff --git a/pandora_console/extras/demodata/visual_consoles/2-linux-visual-console.prd b/pandora_console/extras/demodata/visual_consoles/2-linux-visual-console.prd new file mode 100644 index 0000000000..975dfe7944 --- /dev/null +++ b/pandora_console/extras/demodata/visual_consoles/2-linux-visual-console.prd @@ -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]='Network usage
' +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]='Performance
' +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]='Service httpd
' +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]='CPU Load
' +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]='Memory usage
' +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]='Disk usage
' +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]='Min. today
' +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]='Avg. today
' +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]='Max. today
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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]='(_value_)
' +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" \ No newline at end of file diff --git a/pandora_console/include/ajax/demo_data.ajax.php b/pandora_console/include/ajax/demo_data.ajax.php index 65e33e5182..6a1620f6f4 100644 --- a/pandora_console/include/ajax/demo_data.ajax.php +++ b/pandora_console/include/ajax/demo_data.ajax.php @@ -106,7 +106,10 @@ if ($action === 'create_demo_data') { sort($files, (SORT_NATURAL | SORT_FLAG_CASE)); foreach ($files as $file) { - $parsed_ini[$directory][] = array_merge(['filename' => $file], parse_ini_file($directory_path.'/'.$file, true, INI_SCANNER_TYPED)); + $current_parsed_ini = parse_ini_file($directory_path.'/'.$file, true, INI_SCANNER_TYPED); + if($current_parsed_ini !== false) { + $parsed_ini[$directory][] = array_merge(['filename' => $file], $current_parsed_ini); + } } } @@ -136,7 +139,8 @@ if ($action === 'create_demo_data') { $agent_created_total = 0; $agent_data_values_buffer = []; - $agent_traps_values_buffer = []; + // TRAPS HISTORY: Removed due to performance issues + //$agent_traps_values_buffer = []; if ($total_agents_to_create > 0 && $agents_to_create > 0) { while ($agent_created_total < ($total_agents_to_create - 1)) { @@ -145,8 +149,6 @@ if ($action === 'create_demo_data') { break; } - ///$iter_agents_created = 0; - // Get first server: general value for all created modules. . $server_name = db_get_value('name', 'tserver', 'id_server', 1); @@ -177,12 +179,12 @@ if ($action === 'create_demo_data') { $iter_agents_to_create = $agent_data['agents_number']; - if (($agent_created_total + $iter_agents_to_create/* + $iter_agents_created*/) >= $total_agents_to_create) { + if (($agent_created_total + $iter_agents_to_create) >= $total_agents_to_create) { // Total agents limit specified by user has been reached. break; } else { // Calculate max number of agents that can be created in this iteration until max number specified by user is reached. - $max_agents_to_limit = ($total_agents_to_create - ($agent_created_total + $iter_agents_to_create/* + $iter_agents_created*/)); + $max_agents_to_limit = ($total_agents_to_create - ($agent_created_total + $iter_agents_to_create)); } $modules_data = $ini_agent_data['modules']; @@ -351,15 +353,15 @@ if ($action === 'create_demo_data') { // Register GIS data $values = [ - 'tagente_id_agente' => $created_agent_id, - 'current_longitude' => $longitude, - 'current_latitude' => $latitude, - 'current_altitude' => $altitude, - 'stored_longitude' => $longitude, - 'stored_latitude' => $latitude, - 'stored_altitude' => $altitude, - 'number_of_packages' => 1, - 'manual_placement' => 1, + 'tagente_id_agente' => $created_agent_id, + 'current_longitude' => $longitude, + 'current_latitude' => $latitude, + 'current_altitude' => $altitude, + 'stored_longitude' => $longitude, + 'stored_latitude' => $latitude, + 'stored_altitude' => $altitude, + 'number_of_packages' => 1, + 'manual_placement' => 1, ]; $result = db_process_sql_insert('tgis_data_status', $values); @@ -746,7 +748,8 @@ if ($action === 'create_demo_data') { $utimestamp = time(); - for ($p = 0; $p < $back_periods; $p++) { + // TRAPS HISTORY: Removed due to performance issues + /*for ($p = 0; $p < $back_periods; $p++) { $trap_access_idx = 1; while (1) { @@ -819,6 +822,7 @@ if ($action === 'create_demo_data') { $utimestamp -= $interval; } } + */ } update_progress($total_items_count, $total_agents_to_create, $iter_agents_created); @@ -833,6 +837,7 @@ if ($action === 'create_demo_data') { } $agent_data_values_buffer_chunks = array_chunk($agent_data_values_buffer, 100000); + // TRAPS HISTORY: Removed due to performance issues //$agent_traps_values_buffer_chunks = array_chunk($agent_traps_values_buffer, 100000); foreach ($agent_data_values_buffer_chunks as $chunk) { @@ -858,6 +863,8 @@ if ($action === 'create_demo_data') { $id_trap_begin = 0; } + // TRAPS HISTORY: Removed due to performance issues + /* foreach ($agent_traps_values_buffer_chunks as $chunk) { // Bulk inserts (insert batches of up to 100,000 as a performance limit). mysql_db_process_sql_insert_multiple( @@ -1009,13 +1016,15 @@ if ($action === 'create_demo_data') { continue; } - $service_module_values['id_agente'] = $service_agent_id; $service_module_values['id_tipo_modulo'] = 22; - $service_module_values['nombre'] = io_safe_input($service_data['name'].'_service'); $service_module_values['min_warning'] = $service_data['warning']; $service_module_values['min_critical'] = $service_data['critical']; - $created_service_module_id = db_process_sql_insert('tagente_modulo', $service_module_values); + $created_service_module_id = modules_create_agent_module( + $service_agent_id, + io_safe_input($service_data['name'].'_service'), + $service_module_values + ); if ($created_service_module_id > 0) { // Register created demo item in tdemo_data. @@ -1037,10 +1046,12 @@ if ($action === 'create_demo_data') { continue; } - $service_module_values['id_agente'] = $service_agent_id; $service_module_values['id_tipo_modulo'] = 21; - $service_module_values['nombre'] = io_safe_input($service_data['name'].'_SLA_service'); - $created_sla_service_module_id = db_process_sql_insert('tagente_modulo', $service_module_values); + $created_sla_service_module_id = modules_create_agent_module( + $service_agent_id, + io_safe_input($service_data['name'].'_SLA_service'), + $service_module_values + ); if ($created_sla_service_module_id > 0) { // Register created demo item in tdemo_data. @@ -1062,10 +1073,12 @@ if ($action === 'create_demo_data') { continue; } - $service_module_values['id_agente'] = $service_agent_id; $service_module_values['id_tipo_modulo'] = 22; - $service_module_values['nombre'] = io_safe_input($service_data['name'].'_SLA_Value_service'); - $created_sla_val_service_module_id = db_process_sql_insert('tagente_modulo', $service_module_values); + $created_sla_val_service_module_id = modules_create_agent_module( + $service_agent_id, + io_safe_input($service_data['name'].'_SLA_Value_service'), + $service_module_values + ); if ($created_sla_val_service_module_id > 0) { // Register created demo item in tdemo_data. @@ -1341,10 +1354,16 @@ if ($action === 'create_demo_data') { continue; } + $map_types = [ + 'circular' => 0, + 'radial_dynamic' => 6, + ]; + $nm_name = $map_data['name']; $nm_group = $map_data['group']; $nm_description = (isset($map_data['description']) === true) ? $map_data['description'] : ''; $nm_node_radius = (isset($map_data['node_radius']) === true) ? $map_data['node_radius'] : '40'; + $nm_generation_method = (isset($map_data['generation_method']) === true && isset($map_types[$map_data['generation_method']]) === true) ? $map_types[$map_data['generation_method']] : '0'; $nm_id_group = get_group_or_create_demo_group($nm_group); @@ -1371,7 +1390,11 @@ if ($action === 'create_demo_data') { $values['filter'] = json_encode($new_map_filter); $values['description'] = io_safe_input($nm_description); $values['id_group'] = $nm_id_group; + $values['id_group_map'] = $nm_id_group; + $values['source_data'] = $nm_id_group; $values['name'] = io_safe_input($nm_name); + $values['refresh_time'] = 300; + $values['generation_method'] = $nm_generation_method; $id_map = db_process_sql_insert('tmap', $values); @@ -1872,6 +1895,7 @@ if ($action === 'create_demo_data') { $item_values = [ 'id_graph' => $id_graph, 'id_agent_module' => $module_id, + 'weight' => 1, ]; $created_graph_item_id = db_process_sql_insert('tgraph_source', $item_values); @@ -2198,7 +2222,7 @@ if ($action === 'create_demo_data') { $insert_values['name'] = io_safe_input($data['name']); $insert_values['id_group'] = $id_group; - $insert_values['background'] = (isset($data['background']) === true) ? $data['background'] : 'blackabstract.jpg'; + $insert_values['background'] = (isset($data['background']) === true) ? $data['background'] : 'None.png'; $insert_values['background_color'] = (isset($data['background_color']) === true) ? $data['background_color'] : '#ffffff'; $insert_values['width'] = (isset($data['width']) === true) ? $data['width'] : 1024; $insert_values['height'] = (isset($data['height']) === true) ? $data['height'] : 768; @@ -3151,7 +3175,6 @@ if ($action === 'create_demo_data') { // Create plugin module. $module_values = []; - $module_values['id_agente'] = $plugin_agent_id; $module_values['id_tipo_modulo'] = db_get_value('id_tipo', 'ttipo_modulo', 'nombre', 'generic_proc'); if ($module_values['id_tipo_modulo'] === false) { @@ -3160,13 +3183,16 @@ if ($action === 'create_demo_data') { __('Error in plugin creation: module type "generic_proc" does not exist in the system. Skipping creation of plugin module') ); } else { - $module_values['nombre'] = io_safe_input('Pandora demo data'); $module_values['module_interval'] = $interval; $module_values['id_modulo'] = 4; $module_values['id_plugin'] = $created_plugin_id; $module_values['macros'] = '{"1":{"macro":"_field1_","desc":"Agents files folder path","help":"","value":"/usr/share/pandora_server/util/plugin/demodata_agents","hide":""},"2":{"macro":"_field2_","desc":"Number of agents","help":"","value":"'.$total_agents_to_create.'","hide":""},"3":{"macro":"_field3_","desc":"Traps target IP","help":"","value":"'.$traps_target_ip.'","hide":""},"4":{"macro":"_field4_","desc":"Traps community","help":"","value":"'.$traps_community.'","hide":""},"5":{"macro":"_field5_","desc":"Tentacle target IP","help":"","value":"'.$tentacle_target_ip.'","hide":""},"6":{"macro":"_field6_","desc":"Tentacle port","help":"","value":"'.$tentacle_port.'","hide":""},"7":{"macro":"_field7_","desc":"Tentacle extra options","help":"","value":"'.$tentacle_extra_options.'","hide":""}}'; - $id_plugin_module = db_process_sql_insert('tagente_modulo', $module_values); + $id_plugin_module = modules_create_agent_module( + $plugin_agent_id, + io_safe_input('Pandora demo data'), + $module_values + ); if ($id_plugin_module > 0) { // Register created item in tdemo_data. diff --git a/pandora_server/util/plugin/pandora_demo_agents.pl b/pandora_server/util/plugin/pandora_demo_agents.pl index a746d6969f..8b309ef596 100644 --- a/pandora_server/util/plugin/pandora_demo_agents.pl +++ b/pandora_server/util/plugin/pandora_demo_agents.pl @@ -617,13 +617,13 @@ sub generate_agent($) { my $agents_files_path = $ARGV[0]; my $total_agents = $ARGV[1]; -my $agents_interval = (defined($ARGV[2]) ? $ARGV[2] : 300); +my $agents_interval = (defined($ARGV[2]) && $ARGV[2] ne '' ? $ARGV[2] : 300); -my $traps_ip = (defined($ARGV[3]) ? $ARGV[3] : '127.0.0.1'); -my $traps_community = (defined($ARGV[4]) ? $ARGV[4] : 'public'); +my $traps_ip = (defined($ARGV[3]) && $ARGV[3] ne '' ? $ARGV[3] : '127.0.0.1'); +my $traps_community = (defined($ARGV[4]) && $ARGV[4] ne '' ? $ARGV[4] : 'public'); -my $tentacle_ip = (defined($ARGV[5]) ? $ARGV[5] : '127.0.0.1'); -my $tentacle_port = (defined($ARGV[6]) ? $ARGV[6] : 41121); +my $tentacle_ip = (defined($ARGV[5]) && $ARGV[5] ne '' ? $ARGV[5] : '127.0.0.1'); +my $tentacle_port = (defined($ARGV[6]) && $ARGV[6] ne '' ? $ARGV[6] : 41121); my $tentacle_opts = join(' ', @ARGV[7..$#ARGV]);