diff --git a/pandora_console/extras/demodata/reports/1-linux-report.prd b/pandora_console/extras/demodata/reports/1-linux-report.prd new file mode 100644 index 0000000000..7a274eb968 --- /dev/null +++ b/pandora_console/extras/demodata/reports/1-linux-report.prd @@ -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" \ No newline at end of file diff --git a/pandora_console/extras/demodata/reports/1-sla-report.prd b/pandora_console/extras/demodata/reports/1-sla-report.prd deleted file mode 100644 index 30778dab57..0000000000 --- a/pandora_console/extras/demodata/reports/1-sla-report.prd +++ /dev/null @@ -1,55 +0,0 @@ -[report_data] - -name="SLA report" -group="Demo servers" -description="This is a demo report for SLA" - -[report_items] - -name[1]="linux-1 httpd" -type[1]="SLA" -agent_name[1]="linux-1" -module[1]="Service httpd" -periodicity[1]="86400" - -name[2]="linux-2 httpd" -type[2]="SLA" -agent_name[2]="linux-2" -module[2]="Service httpd" -periodicity[2]="86400" - -name[3]="linux-3 httpd" -type[3]="SLA" -agent_name[3]="linux-3" -module[3]="Service httpd" -periodicity[3]="86400" - -name[4]="linux-4 httpd" -type[4]="SLA" -agent_name[4]="linux-4" -module[4]="Service httpd" -periodicity[4]="86400" - -name[5]="linux-1 mysqld" -type[5]="SLA" -agent_name[5]="linux-1" -module[5]="Service mysqld" -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-3 mysqld" -type[7]="SLA" -agent_name[7]="linux-3" -module[7]="Service mysqld" -periodicity[7]="86400" - -name[8]="linux-4 mysqld" -type[8]="SLA" -agent_name[8]="linux-4" -module[8]="Service mysqld" -periodicity[8]="86400" \ No newline at end of file diff --git a/pandora_console/extras/demodata/reports/2-graphs-report.prd b/pandora_console/extras/demodata/reports/2-graphs-report.prd deleted file mode 100644 index dab4f48828..0000000000 --- a/pandora_console/extras/demodata/reports/2-graphs-report.prd +++ /dev/null @@ -1,60 +0,0 @@ -[report_data] - -name="CPU Load report" -group="Demo network" -description="This is a demo report for CPU Load" - -[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 CPU Load graph" -type[2]="simple_graph" -agent_name[2]="linux-1" -module[2]="CPU Load" -periodicity[2]="86400" - -name[3]="linux-1 CPU Load data" -type[3]="historical_data" -agent_name[3]="linux-1" -module[3]="CPU Load" -periodicity[3]="86400" - -name[4]="linux-2 CPU Load graph" -type[4]="simple_graph" -agent_name[4]="linux-2" -module[4]="CPU Load" -periodicity[4]="86400" - -name[5]="linux-2 CPU Load data" -type[5]="historical_data" -agent_name[5]="linux-2" -module[5]="CPU Load" -periodicity[5]="86400" - -name[6]="linux-3 CPU Load graph" -type[6]="simple_graph" -agent_name[6]="linux-3" -module[6]="CPU Load" -periodicity[6]="86400" - -name[7]="linux-3 CPU Load data" -type[7]="historical_data" -agent_name[7]="linux-3" -module[7]="CPU Load" -periodicity[7]="86400" - -name[8]="linux-4 CPU Load graph" -type[8]="simple_graph" -agent_name[8]="linux-4" -module[8]="CPU Load" -periodicity[8]="86400" - -name[9]="linux-4 CPU Load data" -type[9]="historical_data" -agent_name[9]="linux-4" -module[9]="CPU Load" -periodicity[9]="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 f142aa2ac9..d63a5f4ad0 100644 --- a/pandora_console/include/ajax/demo_data.ajax.php +++ b/pandora_console/include/ajax/demo_data.ajax.php @@ -2111,6 +2111,14 @@ if ($action === 'create_demo_data') { } } + if ($items_array['type'] === 'simple_graph') { + $item_values['style'] = '{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":1,"dyn_height":"250","percentil":0,"fullscale":0,"image_threshold":0,"label":""}'; + } + + if ($items_array['type'] === 'custom_graph') { + $item_values['style'] = '{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250"}'; + } + $item_values['period'] = (isset($items_array['periodicity']) === true) ? $items_array['periodicity'] : 300; $created_report_item_id = db_process_sql_insert('treport_content', $item_values); @@ -2139,6 +2147,7 @@ if ($action === 'create_demo_data') { $sla_values = [ 'id_report_content' => $created_report_item_id, 'id_agent_module' => $item_values['id_agent_module'], + 'sla_limit' => 95, ]; $created_report_content_sla_id = db_process_sql_insert('treport_content_sla_combined', $sla_values);