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

Nagstamon 2.1 don't display all alert. No critical alert appear. Centreon 2.8.2 #344

Closed
crocoolivier opened this issue Dec 30, 2016 · 29 comments

Comments

@crocoolivier
Copy link

Hi,

Thx for your project.

We have just migrate our Centreon to 2.8.3 and sadly, nagstamon is not fully compatible. We can view some warning alerts but not the critical alerts.

Only nagstamon 2.1 can connect to centron 2.8.3.

Do you know of the existence of this issue?

Thx in advance,

@mprenditore
Copy link
Contributor

compatibility to centreon 2.8.x was added with commit e850231 on the 2.1.
I'll investigate about why critical alerts doesn't working.

@BenoitPoulet
Copy link
Contributor

Hello,

I just did the tests with Centreon 2.8.2 (the lastest, 2.8.3 doesn't exist) and the lastest code of Nagstamon.

I tested with : the admin account, a limited account with password auth, a limited account with key auth.

And it's working as you can see :

capture

Try to reset you conf by deleting your folder C:\Users[username].nagstamon
I think you have played with filters.

@crocoolivier
Copy link
Author

crocoolivier commented Jan 3, 2017 via email

@crocoolivier
Copy link
Author

omg we haven't got the same version. I have the 2.1-20161129 version and you 2.1-20161130.
In the website, we can't download this version : https://nagstamon.ifw-dresden.de/download/#unstable
Where can i download the latest version?

Thanks in advance

@mprenditore
Copy link
Contributor

You need to clone/download the repo and run the setup.py to build/install the latest version

@BenoitPoulet
Copy link
Contributor

@crocoolivier Can you try to change the language of you user to "en_US" ?

I can't do the test myself as the french language package has been removed in 2.8.x

@crocoolivier
Copy link
Author

i tried and it's the same problem.
Benoit, have you got your package installation for windows ?
I'm trying to install nagstamon by python but i think that will take a long time.

thanks in advance,

@mprenditore
Copy link
Contributor

@crocoolivier just try to launch "nagstamon.py" and see if it works... if it's fine you can build/install it

@crocoolivier
Copy link
Author

nagstamon.py
'newline' is an invalid keyword argument for this function
Traceback (most recent call last):
File "nagstamon.p
y", line 67, in
from Nagstamon.QUI import (APP,
File "Nagstamon\Q
UI_init_.py", line 479
self.exec(QPoint(x, y)) # noqa
^
SyntaxError: invalid syntax

Sorry i'm not a master of python...

@BenoitPoulet
Copy link
Contributor

I doubt it will change something to try with this version as there is no commit on the Centreon's class since Oct 24, 2016.

Can you try @crocoolivier to enable the debug mode, and post it as attached files ? (But dont forget to remove any sensitive information from the log)

@crocoolivier
Copy link
Author

Here my debug file :
debug-nagstamon.txt

@mprenditore
Copy link
Contributor

@crocoolivier regarding the error, in the file "Nagstamon/QUI/init.py" search for the row
"self.exec(QPoint(x, y)) # noqa"
and subtistute it with
"self.exec_(QPoint(x, y)) # noqa"

This should work... I already fixed on my fork that but didn't commited because didn't try on Windows.

@BenoitPoulet
Copy link
Contributor

I have an idea, but you log is not complete, there is a missing part at the beginning who look like this :

DEBUG: 2017-01-03 13:39:05.328497 Dev Created server.
DEBUG: 2017-01-03 13:39:05.336177 Dev FetchURL: http://10.66.113.52/centreon/index.php CGI Data: None
DEBUG: 2017-01-03 13:39:05.811000 Dev Centreon version detected : 2.8

In the debug i saw that the URLs who are requested are not the same as in my case :
Yours :
DEBUG: 2017-01-03 12:19:55.597196 Centreon FetchURL: http://centreon.domaine.fr/centreon/include/monitoring/status/Hosts/xml/hostXML.php?o=hpb&p=20202&limit=999&sSetOrderInMemory=1&criticality=0&num=0&sid=4cd37ne3cnq999e0f81cs34152&statusHost=hpb CGI Data: None
DEBUG: 2017-01-03 12:19:55.724171 Centreon FetchURL: http://centreon.domaine.fr/centreon/include/monitoring/status/Services/xml/serviceXML.php?o=svcpb&p=20201&nc=0&limit=999&sSetOrderInMemory=1&criticality=0&num=0&statusService=svcpb&sid=4cd37ne3cnq999e0f81cs34152 CGI Data: None

Mines :
DEBUG: 2017-01-03 13:39:06.323570 Dev FetchURL: http://10.66.113.52/centreon/include/monitoring/status/Hosts/xml/hostXML.php?num=0&criticality=0&p=20202&limit=999&sid=0f91rafh2ag7a2b6605uc4ufe7&statusHost=hpb&o=hpb&sSetOrderInMemory=1 CGI Data: None

DEBUG: 2017-01-03 13:39:06.418059 Dev FetchURL: http://10.66.113.52/centreon/include/monitoring/status/Services/xml/serviceXML.php?num=0&criticality=0&statusService=svcpb&nc=0&p=20201&limit=999&sid=0f91rafh2ag7a2b6605uc4ufe7&o=svcpb&sSetOrderInMemory=1 CGI Data: None

So 2 possibility :

  • the auto detection system cannot detect your version properly > we can see it at the beginning of the log
  • the code you have is not up2date

@crocoolivier
Copy link
Author

here the beginning of the debug file :
DEBUG: 2017-01-03 14:08:27.140151 Centreon Created server.
DEBUG: Initializing SystemTrayIcon
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C84C8> for state "OK"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C8438> for state "UNKNOWN"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C8558> for state "WARNING"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C85E8> for state "CRITICAL"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C8678> for state "UNREACHABLE"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C8708> for state "DOWN"
DEBUG: SystemTrayIcon created icon <PyQt5.QtGui.QIcon object at 0x00000000040C8798> for state "ERROR"
DEBUG: SystemTrayIcon initial icon: <PyQt5.QtGui.QIcon object at 0x00000000040C83A8>
DEBUG: 2017-01-03 14:08:27.294166 Centreon FetchURL: http://centreon.domaine.fr/centreon/index.php CGI Data: None
DEBUG: 2017-01-03 14:08:27.394176 Centreon FetchURL: https://nagstamon.ifw-dresden.de/version/unstable CGI Data: None
DEBUG: 2017-01-03 14:08:27.416178 Centreon Centreon version detected : 2.8
DEBUG: 2017-01-03 14:08:27.417178 Centreon FetchURL: http://centreon.domaine.fr/centreon/index.php CGI Data: None
DEBUG: 2017-01-03 14:08:27.553192 Centreon FetchURL: http://centreon.domaine.fr/centreon/index.php CGI Data: {'useralias': 'monid', 'submitLogin': 'Connect', 'password': 'monmotdepasse', 'centreon_token': 'montoken'}
DEBUG: 2017-01-03 14:08:28.147251 Centreon Password login : monid : monmdp
DEBUG: 2017-01-03 14:08:28.147251 Centreon SID : rr47a5np1f987m8a9nsrgdgaa1
DEBUG: 2017-01-03 14:08:28.147251 Centreon Only Centreon Broker is supported in Centeon >= 2.7 so: XML_PATH=xml
DEBUG: 2017-01-03 14:08:28.147251 Centreon URLs defined for Centreon 2.8
DEBUG: 2017-01-03 14:08:28.148251 Centreon FetchURL: http://centreon.domaine.fr/centreon/include/monitoring/status/Hosts/xml/hostXML.php?num=0&p=20202&statusHost=hpb&limit=999&o=hpb&sSetOrderInMemory=1&criticality=0&sid=rr47a5np1f987m8a9nsrgdgaa1 CGI Data: None
DEBUG: 2017-01-03 14:08:28.347271 Centreon FetchURL: http://centreon.domaine.fr/centreon/include/monitoring/status/Services/xml/serviceXML.php?num=0&p=20201&limit=999&o=svcpb&sSetOrderInMemory=1&statusService=svcpb&criticality=0&sid=rr47a5np1f987m8a9nsrgdgaa1&nc=0 CGI Data: None
DEBUG: 2017-01-03 14:08:29.809417 Centreon Service status type : Oracle_ConnectionTime_CCAS11/hard
DEBUG: 2017-01-03 14:08:29.820419 Centreon Service status type : Oracle_Datafiles_Existing_CCAS11/hard
DEBUG: 2017-01-03 14:08:29.829419 Centreon Service status type : Oracle_TableSpace_Usage_CCAS11/hard
DEBUG: 2017-01-03 14:08:29.840421 Centreon Service status type : Ping/hard
DEBUG: 2017-01-03 14:08:29.853422 Centreon Service status type : Load/hard
DEBUG: 2017-01-03 14:08:29.867423 Centreon Service status type : Domaine_Esx_Ha

@crocoolivier
Copy link
Author

And this when i launch nagstamon.py :

nagstamon.py
'newline' is an invalid keyword argument for this function
Traceback (most recent call last):
File "nagstamon.p
y", line 67, in
from Nagstamon.QUI import (APP,
File "Nagstamon\Q
UI_init_.py", line 4367
self.window.exec()
^
SyntaxError: invalid syntax

@crocoolivier
Copy link
Author

i don't understand why but now that's work... Maybe the language...
i'm trying to change the langage to fr and restart my computer to test if it's that or not.

@crocoolivier
Copy link
Author

crocoolivier commented Jan 3, 2017

ok it's that !! Bien joué Benoit ;) Great job Benoit !
i'm sorry... I restarted my nagstamon yet...

So how can i help to fix this issue?

@BenoitPoulet
Copy link
Contributor

To be sure : you confirm that's a problem with the language on you Centreon's profile ?

@crocoolivier
Copy link
Author

crocoolivier commented Jan 3, 2017

yes i'm sure! it's a problem with the language on you Centreon's profile

@BenoitPoulet
Copy link
Contributor

Ok, great.
The problem we have is that the Centreon Team doesn't have released a RPM for the FR language, for Centreon 2.8.x

It only exist for Centreon 2.7, so your 2.8 install must be an upgrade of an 2.7

My test install is a brand new 2.8, so i don't have the french language available.
I will try to install the FR from an 2.7 install into my 2.8, and look what happen, but i'm aware that the Centreon Team is working on a RPM for Centreon 2.8 so it would be wiser to wait until it's out.

@crocoolivier
Copy link
Author

maybe the problem is the same with centreon 2.7 with french language if i use the same french package.

@BenoitPoulet
Copy link
Contributor

No, because i have a lot of users with the french language and Centreon 2.7 and there is no problem.

@crocoolivier
Copy link
Author

You think there is nothing todo on the nagstamon program to fix the issue? just wait the french rpm package?

@BenoitPoulet
Copy link
Contributor

What i said is, i would like to wait the french rpm package. Because if i do a hot fix for this, perhaps that will not work with the official RPM for 2.8 and i will need to do the work twice.

But i will do it if i have enough time.

@crocoolivier
Copy link
Author

ok ok thanks a lot !

@BenoitPoulet
Copy link
Contributor

Hello @crocoolivier

Could you test the fix ?

Centreon has released the french pack for the lastest Centreon version :
centreon-lang-fr_FR-2.8.3

The patch seems working with it

@crocoolivier
Copy link
Author

Thanks for the info. I will try that.
Merci ;)

@BenoitPoulet
Copy link
Contributor

This issue can be closed to. The fix is included is in the devel branch and in the last Nagstamon (unstable ) build.

@HenriWahl
Copy link
Owner

So it shall be...

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

4 participants