statusengine / interface

AngularJS based Web Interface for Statusengine
https://statusengine.org/ui/#overview
GNU General Public License v3.0
18 stars 7 forks source link

All monitoring services of certain hosts are seen in the Statusengine interface #56

Closed sistemmsn closed 1 year ago

sistemmsn commented 1 year ago

hi how are things

from the Statusengine interface it only shows me 15 monitored services and in nagios oh thruk it shows me 17 attached evidence

interface Statusengine: imagen

thruk: imagen

I attach my configuration /usr/share/statusengine-ui/etc/config.yml:

# Statusengine UI Configuration

allow_anonymous: 0

anonymous_can_submit_commands: 1

urls_without_login:
  - login #looks like /login in the browser's address bar
  - loginstate

auth_type: basic

use_mysql: 1

mysql:
    host: 127.0.0.1
    port: 3306
    username: statusengine
    password: x
    database: statusengine
    encoding: utf8

display_perfdata: 1

perfdata_backend: mysql

MySQL as Performance Data Backend WORKER:

# Statusengine Worker Configuration

node_name: Statusengine

use_gearman: 1

gearman:
  address: 127.0.0.1
  port: 4730
  timeout: 1000

use_redis: 1

redis:
  address: 127.0.0.1
  port: 6379
  db: 0

store_live_data_in_archive_backend: 1

use_mysql: 1

mysql:
    host: 127.0.0.1
    port: 3306
    username: statusengine
    password: x
    database: statusengine
    encoding: utf8

dump_mysql_query_parameters: 0

number_of_bulk_records: 100

max_bulk_delay: 2

number_servicestatus_worker: 1

number_hoststatus_worker: 1

number_logentry_worker: 1

number_statechange_worker: 1

number_hostcheck_worker: 1

number_servicecheck_worker: 1

number_misc_worker: 1

process_perfdata: 1

number_perfdata_worker: 1

 - mysql

check_for_commands: 1

command_check_interval: 15

external_command_file: /opt/nagios/var/rw/nagios.cmd

query_handler: /opt/nagios/var/rw/nagios.qh

submit_method: broker

syslog_enabled: 1

syslog_tag: statusengine-worker

age_hostchecks: 5

age_host_acknowledgements: 60

age_host_notifications: 60

age_host_statehistory: 365

age_host_downtimes: 60

age_servicechecks: 5

age_service_acknowledgements: 60

age_service_notifications: 60

age_service_statehistory: 365

age_service_downtimes: 60

age_logentries: 5

age_tasks: 1

age_perfdata: 90

disable_http_proxy: 1
nook24 commented 1 year ago

Hi, pretty interesting issue. The configuration you have pasted seems fine. Is there only one host affected or are services missing on multiple hosts? Are always the same services absent, or is it a random service?

Also, can you please post the naemon service definition of the two missing services? For now, my best guess is maybe a strange character (or non printable) in the service_description.

sistemmsn commented 1 year ago

Hi, how are things,

are services missing on multiple hosts.

I am using nagios Nagios® Core™ 4.4.10

Sometimes it detects 114, sometimes 107 and so it takes it, and when I restart the nagios it goes up little by little, until it reaches the maximum 114 that it has detected, it only happens in the status UI

imagen

imagen

imagen

imagen

imagen

imagen

imagen

imagen

Also, the service states do not match the ones shown by the status-ui and I have to force or restart the service to update the service states

imagen

imagen

And taking advantage of it, do you think it is possible to integrate the graphics generated by the UI, in the thruk instead of pnp4nagios Excellent project !!

sistemmsn commented 1 year ago

I think the problem is in the worker, I checked the database and it did not return all the services and therefore the UI detects what the worker gives it

image

image

nook24 commented 1 year ago

You should restart Naemon, and check the syslog for any errors. If the Statusengine Worker can not insert data to the MySQL database it will log the error message to the syslog. So maybe there is something going wrong with the INSERT INTO SQL statement.

Also please check your table statusengine_servicestatus and make sure that the primary key is set to hostname and service_description grafik

sistemmsn commented 1 year ago

hello, how are you checking what you mentioned, everything is correct with respect to the database that I also noticed, I don't know why it is due, it is that it is somewhat slow to refresh all the services, so far only 4 services of 129 would be missing

image

image

nook24 commented 1 year ago

As I said, please restart Nagios and check your syslog for any errors.

sistemmsn commented 1 year ago

I think I know why the error is given is because of the length of the data, so they cannot be inserted correctly

image

How do I increase that length?

image

Change the data type to longtext, you had it in varchar 255, but I don't know if it's the correct data type, but what it is already pulls, all the services have already been issued

image

image

Now it appears like this

image

sistemmsn commented 1 year ago

There is the possibility of being able to download the images using the url of the resource to create reports

image

nook24 commented 1 year ago

Depending on the used SQL Mode, MySQL can truncate text if it is too long: https://stackoverflow.com/a/18459732 This behavior was the default, maybe they have changed this with MySQL 8 (I'm not sure about this)

There is the possibility of being able to download the images using the url of the resource to create reports

No it is not possible to save this images. The data is stored in the time series database. You can also go with some more advanced tool such as openITCOCKPIT which has different reports available out of the box.

sistemmsn commented 1 year ago

Depending on the used SQL Mode, MySQL can truncate text if it is too long: https://stackoverflow.com/a/18459732 This behavior was the default, maybe they have changed this with MySQL 8 (I'm not sure about this)

There is the possibility of being able to download the images using the url of the resource to create reports

No it is not possible to save this images. The data is stored in the time series database. You can also go with some more advanced tool such as openITCOCKPIT which has different reports available out of the box.

I'm using mariadb Ver 15.1 Distrib 10.11.2-MariaDB, I thought it was a problem with the table, I modified some tables that gave that problem, and with respect to using openitcockpit, not really, I'll continue with nagios core, I'll see how to create the reports, Beforehand thank you very much.

sistemmsn commented 1 year ago

Depending on the used SQL Mode, MySQL can truncate text if it is too long: https://stackoverflow.com/a/18459732 This behavior was the default, maybe they have changed this with MySQL 8 (I'm not sure about this)

There is the possibility of being able to download the images using the url of the resource to create reports

No it is not possible to save this images. The data is stored in the time series database. You can also go with some more advanced tool such as openITCOCKPIT which has different reports available out of the box.

I'm using mariadb Ver 15.1 Distrib 10.11.2-MariaDB, I thought it was a problem with the table, I modified some tables that gave that problem, and with respect to using openitcockpit, not really, I'll continue with nagios core, I'll see how to create the reports, Beforehand thank you very much.