Comments (4)
Hi,
It looks like my problem is resolved.
Indeed, we migrated Centreon from version 20.04 to version 23.10 while keeping the configuration of local accounts.
By recreating the local account, used by Nagstamon, with a password and not the autologin, then the connection is successful and I have the logs that you mention above.
I think there was a conflict with the migrated account.
In conclusion :
Recreating the local account using a username + password solved my problem.
Thank you very much for your time.
from nagstamon.
Hello,
"Autologin Key" is not supported by the Centreon API v2.
You must use a username & password.
Please check on your account that the "Reach API Realtime" is enable on you account.
from nagstamon.
Hi,
Thank you for your answer :)
The "Reach API Realtime" function is activated for my account.
I used username and password but the problem is the same:
Maybe there is a security option to activate in Centreon?
Thanks :)
from nagstamon.
Something seems to be wrong with your credentials, because you have an 401, authentification failed.
this is the debug for a successful connection :
DEBUG: 2024-01-15 11:57:30.437446 Centreon Dev FetchURL: http://my_host/centreon/api/latest/platform/versions CGI Data: None
DEBUG: 2024-01-15 11:57:30.628492 [Centreon Dev] Status code 200
DEBUG: 2024-01-15 11:57:30.628492 [Centreon Dev] Loading class API, Centreon version : 24.4
DEBUG: 2024-01-15 11:57:30.629450 Centreon Dev Created server.
DEBUG: 2024-01-15 11:57:30.640225 Centreon Dev FetchURL: http://my_host/centreon/api/latest/platform/versions CGI Data: None
DEBUG: 2024-01-15 11:57:30.850851 [Centreon Dev] Centreon version detected : 24.4
DEBUG: 2024-01-15 11:57:30.851860 [Centreon Dev] Centreon API version used : v23.10
DEBUG: 2024-01-15 11:57:30.936992 [Centreon Dev] Checking session status
DEBUG: 2024-01-15 11:57:30.936992 [Centreon Dev] Check-session, the token expire if not been used for more than one hour. Current Token = None
DEBUG: 2024-01-15 11:57:30.936992 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?limit=0 CGI Data: None
DEBUG: 2024-01-15 11:57:31.106125 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/login CGI Data: {"security": {"credentials": {"login": "simpleuser", "password": "fGu5S16@PZCu"}}}
DEBUG: 2024-01-15 11:57:31.723450 Centreon Dev Fetched JSON: {'contact': {'alias': 'simpleuser',
'email': '[email protected]',
'id': 20,
'is_admin': False,
'name': 'simpleuser'},
'security': {'token': 'OhCL+SSeTKTfJG4On2g3H09kCdAX6dxlZYGomzoQ41o9Gz7iJUkZUKLzIgX9lQnL'}}
DEBUG: 2024-01-15 11:57:31.723450 [Centreon Dev] API login : simpleuser / fGu5S16@PZCu > Token : OhCL+SSeTKTfJG4On2g3H09kCdAX6dxlZYGomzoQ41o9Gz7iJUkZUKLzIgX9lQnL > User ID : 20
DEBUG: 2024-01-15 11:57:31.723450 [Centreon Dev] Check-session, session renewed
DEBUG: 2024-01-15 11:57:31.723450 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?limit=0 CGI Data: None
DEBUG: 2024-01-15 11:57:32.092048 Centreon Dev Check-session, Fetched JSON: {'meta': {'limit': 0, 'page': 1, 'search': {}, 'sort_by': {}, 'total': 10},
'result': []}
DEBUG: 2024-01-15 11:57:32.092048 Centreon Dev Check-session, Error : , Status code : 200
DEBUG: 2024-01-15 11:57:32.092048 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?types=["host"]&statuses=["WARNING","DOWN","CRITICAL","UNKNOWN"]&limit=9999 CGI Data: None
DEBUG: 2024-01-15 11:57:32.241491 [Centreon Dev] Host indexed : host_who_is_down
DEBUG: 2024-01-15 11:57:32.241491 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?types=["metaservice","service"]&statuses=["WARNING","DOWN","CRITICAL","UNKNOWN"]&limit=9999 CGI Data: None
DEBUG: 2024-01-15 11:57:32.402363 [Centreon Dev] Service indexed : host_who_is_down / Ping
DEBUG: 2024-01-15 11:57:32.402363 [Centreon Dev] Service indexed : localhost / Swap
DEBUG: 2024-01-15 11:57:32.402363 [Centreon Dev] Service indexed : host_who_is_down / Dummy
DEBUG: 2024-01-15 11:57:32.402363 Centreon Dev Filter: Service on host in DOWN host_who_is_down;Ping
DEBUG: 2024-01-15 11:57:32.402363 Centreon Dev Filter: Service on host in DOWN host_who_is_down;Dummy
DEBUG: 2024-01-15 11:57:32.608002 Saving configuration to file c:\users\benoit.poulet\.nagstamon\nagstamon.conf
DEBUG: 2024-01-15 11:57:32.623895 Centreon Dev Refreshing all hosts and services
DEBUG: 2024-01-15 11:57:33.402930 [Centreon Dev] Checking session status
DEBUG: 2024-01-15 11:57:33.402930 [Centreon Dev] Check-session, the token expire if not been used for more than one hour. Current Token = OhCL+SSeTKTfJG4On2g3H09kCdAX6dxlZYGomzoQ41o9Gz7iJUkZUKLzIgX9lQnL
DEBUG: 2024-01-15 11:57:33.402930 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?limit=0 CGI Data: None
DEBUG: 2024-01-15 11:57:33.545524 Centreon Dev Check-session, Fetched JSON: {'meta': {'limit': 0, 'page': 1, 'search': {}, 'sort_by': {}, 'total': 10},
'result': []}
DEBUG: 2024-01-15 11:57:33.545524 Centreon Dev Check-session, Error : , Status code : 200
DEBUG: 2024-01-15 11:57:33.545524 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?types=["host"]&statuses=["WARNING","DOWN","CRITICAL","UNKNOWN"]&limit=9999 CGI Data: None
DEBUG: 2024-01-15 11:57:33.700541 [Centreon Dev] Host indexed : host_who_is_down
DEBUG: 2024-01-15 11:57:33.700541 Centreon Dev FetchURL: http://my_host/centreon/api/v23.10/monitoring/resources?types=["metaservice","service"]&statuses=["WARNING","DOWN","CRITICAL","UNKNOWN"]&limit=9999 CGI Data: None
DEBUG: 2024-01-15 11:57:33.848793 [Centreon Dev] Service indexed : host_who_is_down / Ping
DEBUG: 2024-01-15 11:57:33.850120 [Centreon Dev] Service indexed : localhost / Swap
DEBUG: 2024-01-15 11:57:33.850120 [Centreon Dev] Service indexed : host_who_is_down / Dummy
DEBUG: 2024-01-15 11:57:33.850120 Centreon Dev Filter: Service on host in DOWN host_who_is_down;Ping
DEBUG: 2024-01-15 11:57:33.850120 Centreon Dev Filter: Service on host in DOWN host_who_is_down;Dummy
from nagstamon.
Related Issues (20)
- nagstamon v3.14.0 on Win11 23H2 - icinga KeyError host_name HOT 2
- 3.14 locks up at start HOT 4
- Updating nagstatmon from 3.10.1 to 3.14.0 breaks on Windows 2022 HOT 4
- Nagstamon 3.14.0 and Zabbix 6.2.9 - All information copy not complate HOT 2
- Regex duration issue HOT 2
- ValueError when parsing QT_VERSION_STR HOT 10
- AttributeError with Icinga DB 1.2.0 / Icinga DB Web 1.1.2 HOT 2
- Help for integration HOT 3
- [Feature][Integration] Opsgenie HOT 2
- Display own columns from check_MK view in nagstamon HOT 2
- Sorting by duration not saved when restarting nagstamon (minor cosmetic problem) HOT 2
- Nagstamon 3.15-20240506, Fedora 40, Couldn't load VAAPI library HOT 8
- MacOS 14.5 no sound
- Nagstamon not filtering DOWN hosts for DURATION HOT 1
- Can you add universal release for Linux ? HOT 1
- Problem with settings in Nagstamon 3.14 in windows HOT 2
- check-mk saml auth with entra-id as idp HOT 9
- nagstamon on Fedora 40 issue HOT 2
- After Update Icingadb to 1.2.0 / IcingaDB-Web to 1.1.2: Error 'AttributeError: 'bool object has not attribute 'replace' HOT 2
- Taskbar integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nagstamon.