Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data display error #37

Open
sistemmsn opened this issue Nov 3, 2023 · 31 comments
Open

Data display error #37

sistemmsn opened this issue Nov 3, 2023 · 31 comments

Comments

@sistemmsn
Copy link

I have almost 500 nodes and 1500 services, it gets stuck for a while but the data is not showing as it should
image

image
I have it mounted in docker

@rchakode
Copy link
Owner

rchakode commented Nov 5, 2023

Hi @sistemmsn,
Can you check if the process is still running inside the container ?

ps -edf | grep realopinsight

@sistemmsn
Copy link
Author

sistemmsn commented Nov 6, 2023

image

and this error also appears

image

And taking advantage of the fact that you think you can change the version of the dockerfile to a newer one is that I have to use version 2 in docker compose, I think I'm not very sure, the issue is that it asks me to use variables from previous versions and if you have a docker compose echo it would be good to have it at your disposal. Well, this is mine, but I couldn't enter the network

` services:
realopinsigh:
container_name: realopinsigh
hostname: realopinsigh
image: rchakode/realopinsight:latest
restart: always
volumes:
- realopinsight:/opt/realopinsight
- realopinsight_data:/data
- /etc/localtime:/etc/localtime:ro

realopinsightdb:
container_name: realopinsightdb
hostname: realopinsightdb
image: postgres
restart: always
depends_on:
- realopinsigh
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: realopinsight
POSTGRES_USER: realopinsight
TZ: America/Mexico_City
volumes:
- realopinsightdb:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro

volumes:
realopinsightdb: {}
realopinsight: {}
realopinsight_data: {}
`

@rchakode
Copy link
Owner

rchakode commented Nov 7, 2023

All processes look good.
What about the cpu and memory usage in the container and also regarding the machine hosting the containers?

I will check about the error in the editor.

About the Dockerfile, can share your suggestions through a PR please?

I'ml try to review your config, but I'm an expert of Docker compose :)

@sistemmsn
Copy link
Author

These images are from the docker server where the containers are hosted

image

image

image

It seems that it is a performance issue that I have to do to make it work optimally.

image

@rchakode
Copy link
Owner

rchakode commented Nov 7, 2023

Performance issue indeed.
We can work to fix it if it's possible for you to provide us with a sample of such a file.

You can offuscate the names of your servers and services inside the file.

Edit: if you want, you can upload the file in a private repo and provide me access to it.

@sistemmsn
Copy link
Author

Sure, no problems, but what do I give you access to? oh what do I upload? forgive my ignorance hehe

@rchakode
Copy link
Owner

rchakode commented Nov 8, 2023

I assume you've used the automatic import feature to build the view.
In this case, you can find the associated file at the following location : /opt/realopinsight/roi_<generated-id>_autoimport.ms.ngrt4n.xml.

I you have several files at that location, please use grep to find the name of the service name in the appropriate file.

If you want to share the file privately, upload the file in private GitHub repo (create a new one if needed) and share the repo with me.

@sistemmsn
Copy link
Author

It seems that it does not load the data or simply does not create it

image

I thought it was the issue of my compose, but I ran it again as you have it on your page and it came out with the same result.

@rchakode
Copy link
Owner

rchakode commented Nov 8, 2023

Oh, weird.
Can you connect to the database and list all entries in the view table?

This should show the path of config associated to each service view.

@sistemmsn
Copy link
Author

sistemmsn commented Nov 8, 2023

I already shared a private repo with you, it seems that the files appeared when I configured the postgres database
I had to compress it to zip because it won't let me upload more than 25mb

@rchakode
Copy link
Owner

rchakode commented Nov 9, 2023

got it, I will investigate and let you know.

@sistemmsn
Copy link
Author

Some news?

@rchakode
Copy link
Owner

Work in progress, need to find a way to avoid overloading the cpu with large view.
Parallelization and batch processing are options under investigation.

@sistemmsn
Copy link
Author

I am testing from some nagios with few nodes and I notice the same result. I don't know if it is something else.

image

image

@rchakode
Copy link
Owner

rchakode commented Mar 3, 2024

@sistemmsn
The messages on the console indicate probes that seem to not exists :

  • Check that Source0 exists and points to a Nagios source.
  • Check that all the probes listed in the view exists

@sistemmsn
Copy link
Author

@sistemmsn The messages on the console indicate probes that seem to not exists :

  • Check that Source0 exists and points to a Nagios source.
  • Check that all the probes listed in the view exists

image

image

image

From what I see it only works via IP, do an echo on the xinet that I have configured and if it brings me the data, what else can I do to do a debug and see the origin of the problem? All the information below is docker.

echo -e "GET hosts\n" | netcat 172.20.0.253 6557

accept_passive_checks;acknowledged;acknowledgement_type;action_url;action_url_expanded;active_checks_enabled;address;alias;check_command;check_command_expanded;check_flapping_recovery_notification;check_freshness;check_interval;check_options;check_period;check_type;checks_enabled;childs;comments;comments_with_extra_info;comments_with_info;contact_groups;contacts;current_attempt;current_notification_number;custom_variable_names;custom_variable_values;custom_variables;display_name;downtimes;downtimes_with_extra_info;downtimes_with_info;event_handler;event_handler_enabled;execution_time;filename;first_notification_delay;flap_detection_enabled;flappiness;groups;hard_state;has_been_checked;high_flap_threshold;icon_image;icon_image_alt;icon_image_expanded;in_check_period;in_notification_period;in_service_period;initial_state;is_executing;is_flapping;label_names;label_source_names;label_source_values;label_sources;label_values;labels;last_check;last_hard_state;last_hard_state_change;last_notification;last_state;last_state_change;last_time_down;last_time_unreachable;last_time_up;latency;long_plugin_output;low_flap_threshold;max_check_attempts;metrics;mk_inventory;mk_inventory_gz;mk_inventory_last;mk_logwatch_files;modified_attributes;modified_attributes_list;name;next_check;next_notification;no_more_notifications;notes;notes_expanded;notes_url;notes_url_expanded;notification_interval;notification_period;notification_postponement_reason;notifications_enabled;num_services;num_services_crit;num_services_handled_problems;num_services_hard_crit;num_services_hard_ok;num_services_hard_unknown;num_services_hard_warn;num_services_ok;num_services_pending;num_services_unhandled_problems;num_services_unknown;num_services_warn;obsess_over_host;parents;pending_flex_downtime;percent_state_change;perf_data;plugin_output;pnpgraph_present;previous_hard_state;process_performance_data;retry_interval;scheduled_downtime_depth;service_period;services;services_with_fullstate;services_with_info;services_with_state;smartping_timeout;staleness;state;state_type;statusmap_image;structured_status;tag_names;tag_values;tags;total_services;worst_service_hard_state;worst_service_state;x_3d;y_3d;z_3d
1;0;0;;;1;127.0.0.1;localhost;check-host-alive;check-host-alive;0;0;5;0;24x7;0;1;;;;;admins;nagiosadmin;1;0;;;;localhost;;;;;1;4.15139;;0;1;0;linux-servers;0;1;0;;;;1;0;1;0;0;0;;;;;;;1709492006;0;1709473990;0;0;1709473990;0;0;1709492006;0;;0;10;;;;0;;0;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;localhost;1709492306;0;0;;;;;120;workhours;;1;8;1;0;1;6;0;1;6;0;2;0;1;1;;0;0;rta=0.051000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0;PING OK - Packet loss = 0%, RTA = 0.05 ms;-1;-1;1;1;0;;Total Processes,Swap Usage,SSH,Root Partition,PING,HTTP,Current Users,Current Load;Total Processes|0|1|PROCS OK: 39 processes with STATE = RSZDT|0|1|4|0|0|1,Swap Usage|0|1|SWAP OK - 97% free (1966 MB out of 2048 MB)|0|1|4|0|0|1,SSH|2|1|connect to address 127.0.0.1 and port 22: Connection refused|2|4|4|0|0|1,Root Partition|0|1|DISK OK - free space: / 870771 MiB (88.98% inode=95%):|0|1|4|0|0|1,PING|0|1|PING OK - Packet loss = 0%, RTA = 0.06 ms|0|1|4|0|0|1,HTTP|1|1|HTTP WARNING: HTTP/1.1 403 Forbidden - 4972 bytes in 0.001 second response time|1|4|4|0|0|1,Current Users|0|1|USERS OK - 0 users currently logged in|0|1|4|0|0|1,Current Load|0|1|OK - load average: 0.06, 0.12, 0.15|0|1|4|0|0|1;Total Processes|0|1|PROCS OK: 39 processes with STATE = RSZDT,Swap Usage|0|1|SWAP OK - 97% free (1966 MB out of 2048 MB),SSH|2|1|connect to address 127.0.0.1 and port 22: Connection refused,Root Partition|0|1|DISK OK - free space: / 870771 MiB (88.98% inode=95%):,PING|0|1|PING OK - Packet loss = 0%, RTA = 0.06 ms,HTTP|1|1|HTTP WARNING: HTTP/1.1 403 Forbidden - 4972 bytes in 0.001 second response time,Current Users|0|1|USERS OK - 0 users currently logged in,Current Load|0|1|OK - load average: 0.06, 0.12, 0.15;Total Processes|0|1,Swap Usage|0|1,SSH|2|1,Root Partition|0|1,PING|0|1,HTTP|1|1,Current Users|0|1,Current Load|0|1;750000;0.44;0;1;;;;;;8;2;2;0;0;0

@rchakode
Copy link
Owner

rchakode commented Mar 4, 2024

If your livestatus is on a different container than RealOpInsight, this is not the way to go.

Instead you can either publish the port of the livestatus service (-p flag of docker command) or use --network=host to expose on the host machine.

Then use the proper address to configure RealOpInsight.

@sistemmsn
Copy link
Author

mmmm... I really don't understand, it should work, look this is what I have:

I have 3 stacks, one with realopinsight, another where nagios lives and an nginx manager, all 3 share the proxy network

Stack 1

 services:
  realopinsigh:
   container_name:	realopinsigh
   hostname: realopinsigh
   image: rchakode/realopinsight
   restart: always
   environment:
     - REALOPINSIGHT_DB_TYPE=1
     - REALOPINSIGHT_DB_SERVER_ADDR=realopinsightdb
     - REALOPINSIGHT_DB_SERVER_PORT=5432
     - REALOPINSIGHT_DB_NAME=realopinsight
     - REALOPINSIGHT_DB_USER=realopinsight
     - REALOPINSIGHT_DB_PASSWORD=password
     - TZ=America/Mexico_City
   ports:
     - 4583:4583
   volumes:
     - realopinsight:/opt/realopinsight
     - realopinsight_data:/data
     - /etc/localtime:/etc/localtime:ro
   networks:
      proxy: 
        
      
  realopinsightdb:
   container_name:	realopinsightdb
   hostname: realopinsightdb
   image: postgres
   restart: always
   depends_on:
      - realopinsigh
   environment:
      POSTGRES_PASSWORD: password
      POSTGRES_DB: realopinsight
      POSTGRES_USER: realopinsight
      TZ: America/Mexico_City
   volumes:
     - realopinsightdb:/var/lib/postgresql/data
     - /etc/localtime:/etc/localtime:ro
   networks:
      proxy: 

 networks:
  proxy:
    external: true

 volumes:
   realopinsightdb:
   realopinsight: 
   realopinsight_data:

Stack 2

services:

 nagios:
   container_name: nagios
   hostname: nagios
   image: nagios:4.4.14-A9
   restart: always
   volumes:
      - /etc/localtime:/etc/localtime:ro
      - nagios_etc:/opt/nagios/etc
      - nagios_logos:/opt/nagios/share/images/logos
      - nagios_rw:/opt/nagios/var/rw
      - nagios_archives:/opt/nagios/var/archives
      - myplugins:/opt/nagios/myplugins
      - thruk_etc:/etc/thruk
      - thruk_themes:/usr/share/thruk/themes/themes-available
      - pnp4nagios:/opt/pnp4nagios/var/perfdata
      - httpd:/etc/httpd/conf.d
      - lib:/opt/statusengine/lib
      - etc:/opt/statusengine/etc
      - crond:/etc/cron.d
      - mrtg_etc:/etc/mrtg
      - mrtg_lib:/var/lib/mrtg
      - nagvis_var:/opt/nagvis/var
      - nagvis_etc:/opt/nagvis/etc
      - worker:/opt/openitc/statusengine3/worker/bin
      - ./settings.php:/opt/nagiosql/config/settings.php:ro
   networks:
      proxy: 
       ipv4_address: 172.20.0.254
 
 xinet:
   container_name: xinet
   hostname: xinet
   image: xinet:A9
   depends_on:
      - nagios
   restart: always  
   volumes:
      - /etc/localtime:/etc/localtime:ro
      - nagios_rw:/opt/nagios/var/rw
   networks:
      proxy:
         ipv4_address: 172.20.0.253 


volumes:
  nagios_etc:
  myplugins:
  nagios_logos:
  nagios_rw:
  nagios_archives:
  thruk_etc:
  thruk_themes:
  pnp4nagios:
  httpd:
  mrtg_etc:
  mrtg_lib:
  crond:
  nagvis_var:
  nagvis_etc:

networks:
  proxy:
    external: true

@rchakode
Copy link
Owner

rchakode commented Mar 4, 2024

From the RealOpInsight container, what is the result of the following command ?

echo -e "GET hosts\n" | netcat <NAGIOS-LS-HOST 6557

Replace <NAGIOS-LS-HOST> accordingly.

@sistemmsn
Copy link
Author

sistemmsn commented Mar 5, 2024

echo -e "GET hosts\n" | netcat <NAGIOS-LS-HOST 6557

It does not deliver data, I had to install netcat but in the realopinsigh container
image

I have the images published
https://hub.docker.com/r/sistemmsn/nagios/tags

@rchakode
Copy link
Owner

rchakode commented Mar 5, 2024

That's why you have item not found messages on the initial screenshot.

This check shall return the same results as from the Nagios machine.

I will not be able to troobleshoot your container image, neither than your Docker config, however here is another way to test :

  • Start the Nagios/xinet container with --network=host flag (means that all ports will be bound on the Docker machine)
  • Start the RealOpInsight container with the same flag.
  • Use the IP address of the Docker machine as target, same port as configured in the xinet image.

@sistemmsn
Copy link
Author

sistemmsn commented Mar 5, 2024

That's why you have item not found messages on the initial screenshot.

This check shall return the same results as from the Nagios machine.

I will not be able to troobleshoot your container image, neither than your Docker config, however here is another way to test :

  • Start the Nagios/xinet container with --network=host flag (means that all ports will be bound on the Docker machine)
  • Start the RealOpInsight container with the same flag.
  • Use the IP address of the Docker machine as target, same port as configured in the xinet image.

We continue the same, it's a problem with your application.
already set host mode
image
image
image

From the realopinsigh container it already shows me livestatus data, but from the interface we continue the same

services:
  realopinsigh:
   container_name:	realopinsigh
   hostname: realopinsigh
   network_mode: host
   image: rchakode/realopinsight
   restart: always
   ports:
     - 4583:4583
   environment:
     - REALOPINSIGHT_DB_TYPE=1
     - REALOPINSIGHT_DB_SERVER_ADDR=realopinsightdb
     - REALOPINSIGHT_DB_SERVER_PORT=5432
     - REALOPINSIGHT_DB_NAME=realopinsight
     - REALOPINSIGHT_DB_USER=realopinsight
     - REALOPINSIGHT_DB_PASSWORD=password
     - TZ=America/Mexico_City
   volumes:
     - realopinsight:/opt/realopinsight
     - realopinsight_data:/data
     - /etc/localtime:/etc/localtime:ro

@rchakode
Copy link
Owner

rchakode commented Mar 5, 2024

Correct me if I'm wrong, for example : in the screenshot I'm not able to see the probe associated to localhost/root partition (e.g. a check named root partition on localhost => nagios server).

@sistemmsn
Copy link
Author

sistemmsn commented Mar 5, 2024

Corríjame si me equivoco, por ejemplo: en la captura de pantalla no puedo ver la sonda asociada localhost/root partition(por ejemplo, una verificación nombrada root partitionen localhost=> servidor nagios).

raise one test
image
image

that is the ip of the physical docker server
image

@rchakode
Copy link
Owner

rchakode commented Mar 5, 2024

Can you provide the whole output from the livestarus service please (as raw text) ?

@sistemmsn
Copy link
Author

¿Puede proporcionarnos el resultado completo del servicio livestarus (como texto sin formato)?

it is this ?
realopinsight@realopinsigh:/app$ echo -e "GET hosts\n" | netcat 10.0.0.12 6557
accept_passive_checks;acknowledged;acknowledgement_type;action_url;action_url_expanded;active_checks_enabled;address;alias;check_command;check_command_expanded;check_flapping_recovery_notification;check_freshness;check_interval;check_options;check_period;check_type;checks_enabled;childs;comments;comments_with_extra_info;comments_with_info;contact_groups;contacts;current_attempt;current_notification_number;custom_variable_names;custom_variable_values;custom_variables;display_name;downtimes;downtimes_with_extra_info;downtimes_with_info;event_handler;event_handler_enabled;execution_time;filename;first_notification_delay;flap_detection_enabled;flappiness;groups;hard_state;has_been_checked;high_flap_threshold;icon_image;icon_image_alt;icon_image_expanded;in_check_period;in_notification_period;in_service_period;initial_state;is_executing;is_flapping;label_names;label_source_names;label_source_values;label_sources;label_values;labels;last_check;last_hard_state;last_hard_state_change;last_notification;last_state;last_state_change;last_time_down;last_time_unreachable;last_time_up;latency;long_plugin_output;low_flap_threshold;max_check_attempts;metrics;mk_inventory;mk_inventory_gz;mk_inventory_last;mk_logwatch_files;modified_attributes;modified_attributes_list;name;next_check;next_notification;no_more_notifications;notes;notes_expanded;notes_url;notes_url_expanded;notification_interval;notification_period;notification_postponement_reason;notifications_enabled;num_services;num_services_crit;num_services_handled_problems;num_services_hard_crit;num_services_hard_ok;num_services_hard_unknown;num_services_hard_warn;num_services_ok;num_services_pending;num_services_unhandled_problems;num_services_unknown;num_services_warn;obsess_over_host;parents;pending_flex_downtime;percent_state_change;perf_data;plugin_output;pnpgraph_present;previous_hard_state;process_performance_data;retry_interval;scheduled_downtime_depth;service_period;services;services_with_fullstate;services_with_info;services_with_state;smartping_timeout;staleness;state;state_type;statusmap_image;structured_status;tag_names;tag_values;tags;total_services;worst_service_hard_state;worst_service_state;x_3d;y_3d;z_3d
1;0;0;;;1;127.0.0.1;localhost;check-host-alive;check-host-alive;0;0;5;0;24x7;0;1;;;;;admins;nagiosadmin;1;0;;;;localhost;;;;;1;4.09543;;0;1;0;linux-servers;0;1;0;;;;1;1;1;0;0;0;;;;;;;1709669998;0;1709668207;0;0;1709668207;0;0;1709669998;0;;0;10;;;;0;;0;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;localhost;1709670298;0;0;;;;;120;workhours;;1;8;1;0;1;6;0;1;6;0;2;0;1;1;;0;0;rta=0.046000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0;PING OK - Packet loss = 0%, RTA = 0.05 ms;-1;-1;1;1;0;;Total Processes,Swap Usage,SSH,Root Partition,PING,HTTP,Current Users,Current Load;Total Processes|0|1|PROCS OK: 29 processes with STATE = RSZDT|0|1|4|0|0|1,Swap Usage|0|1|SWAP OK - 100% free (15332 MB out of 15359 MB)|0|1|4|0|0|1,SSH|2|1|connect to address 127.0.0.1 and port 22: Connection refused|2|4|4|0|0|1,Root Partition|0|1|DISK OK - free space: / 198191 MiB (89.41% inode=96%):|0|1|4|0|0|1,PING|0|1|PING OK - Packet loss = 0%, RTA = 0.04 ms|0|1|4|0|0|1,HTTP|1|1|HTTP WARNING: HTTP/1.1 403 Forbidden - 4972 bytes in 0.001 second response time|1|4|4|0|0|1,Current Users|0|1|USERS OK - 0 users currently logged in|0|1|4|0|0|1,Current Load|0|1|OK - load average: 0.00, 0.08, 0.07|0|1|4|0|0|1;Total Processes|0|1|PROCS OK: 29 processes with STATE = RSZDT,Swap Usage|0|1|SWAP OK - 100% free (15332 MB out of 15359 MB),SSH|2|1|connect to address 127.0.0.1 and port 22: Connection refused,Root Partition|0|1|DISK OK - free space: / 198191 MiB (89.41% inode=96%):,PING|0|1|PING OK - Packet loss = 0%, RTA = 0.04 ms,HTTP|1|1|HTTP WARNING: HTTP/1.1 403 Forbidden - 4972 bytes in 0.001 second response time,Current Users|0|1|USERS OK - 0 users currently logged in,Current Load|0|1|OK - load average: 0.00, 0.08, 0.07;Total Processes|0|1,Swap Usage|0|1,SSH|2|1,Root Partition|0|1,PING|0|1,HTTP|1|1,Current Users|0|1,Current Load|0|1;750000;0.826667;0;1;;;;;;8;2;2;0;0;0
realopinsight@realopinsigh:/app$

@rchakode
Copy link
Owner

rchakode commented Mar 7, 2024

Hi @sistemmsn
I dont' know if it's due to the copy/paste, but the format of the data is not what is expected by RealOpInsight.
What is the version of the livestatus service ?

Read the following article to see the valided format for Livestatus output: https://docs.checkmk.com/latest/en/livestatus.html

@sistemmsn
Copy link
Author

sistemmsn commented Mar 8, 2024

Hola@sistemmsn No sé si se debe a copiar y pegar, pero el formato de los datos no es el esperado por RealOpInsight. ¿Cuál es la versión del servicio LiveStatus?

Lea el siguiente artículo para ver el formato validado para la salida de Livestatus: https://docs.checkmk.com/latest/en/livestatus.html

Well look, I compile it from the checkmk source code

 wget https://download.checkmk.com/checkmk/2.1.0p33/check-mk-raw-2.1.0p33.cre.tar.gz && \
    tar -xvzf check-mk-raw-2.1.0p33.cre.tar.gz  && \
    cd check-mk-raw-2.1.0p33.cre && \
    ./configure --with-nagios4   && \
    cd livestatus && \
    make && \
    make install

Well then tell me which version of livestatus I compile because that's what it is, then it's a matter of the application of how it wants to receive the data, I'll also test an older version where you tell me if it receives the information correctly

this is the live version
#37 (comment)

@rchakode
Copy link
Owner

rchakode commented Mar 10, 2024

RealOpInsght has been intially validated with Livestatus 1.2.5i1, it shall likely work with all versions 1.x.

@sistemmsn
Copy link
Author

RealOpInsght has been intially validated with Livestatus 1.2.5i1, it shall likely work with all versions 1.x.

I compiled 1.6.0p30 and it gave the same result, close the case, since that version you mention is no longer available, I give up, I will wait for someone to update the version

@sistemmsn sistemmsn closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
@rchakode rchakode reopened this Mar 12, 2024
@rchakode
Copy link
Owner

I've reopen the issue to adapt the backend to recent versions of Livestatus output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants