Question

Errors related to the update plugin pack "Microsoft SQL Server"

  • 13 December 2022
  • 5 replies
  • 298 views

Badge +2

Hello,
I have just updated the "Microsoft SQL Server" plug-in pack
Since then, using the "App-DB-MSSQL-Connected-Users-custom" template the following error comes up: "UNKNOWN: Can't call method "fetchrow_array" on an undefined value at /usr/lib/centreon/plugins//centreon_mssql.pl line 11520"
Same for the "App-DB-MSSQL-Deadlocks-custom" template the following error comes up:
"UNKNOWN: Can't call method "fetchall_arrayref" on an undefined value at /usr/lib/centreon/plugins//centreon_mssql.pl line 12047."
I would like to point out that before the update, everything was working normally.
Thanks in advance for your feedback

 


5 replies

Userlevel 5
Badge +14

the support gave me the fix : 

you need to download an “unstable” plugin, there is something broken in the current plugin in the RPM

(unstable is the name of the dev repository before going in production)

 

i’m not sure if I can give here what the support told me, if you use plugin pack, you should have support, it was ticket 113731, they send me a command line to run and install the corrected plugin

 

I’m not sure what is the policy from centreon but this is a breaking bug, why was the repo not updated (I had the bug on 23rd november, 3 weeks ago)

Badge +2

I'm sorry, but I have no support and therefore no access to the command line.🙁

Userlevel 5
Badge +14

ha well, it’s not like the repository is private, it’s all public.

However I have no idea if it work for you, and I won’t provide support if it breaks (it shouldn’t, it’s pretty easy to undo if you just use yum install)

if you use debian you are on your own, this will only work with redhat based distrib

 

the support gave me that

yum install https://yum.centreon.com/standard/22.04/el7/unstable/noarch/plugins/centreon-plugins-20221117-092737/centreon-plugin-Applications-Databases-Mssql-20221117-092737.el7.centos.noarch.rpm

as you can see it is for version 22.04 which I have, and Centos7

 

you can browse the repository here Index of /standard/22.04/el7/unstable/noarch/plugins/centreon-plugins-20221117-092737

 

if you go up the file explorer to your release for example 22.10 on alma8:

/standard/22.10/el8/unstable/noarch/plugins

 

you will see a sub folder for each date, the one they gave me was 20221117 (17 nov 2022)

 

in this folder, look for the file

centreon-plugin-Applications-Databases-Mssql-20221117.......

copy the link

 

then do

yum install the-link

 

if it's not working, then

yum remove centreon-plugin-Applications-Databases-Mssql

and you can reinstall the stable one it with 

yum install centreon-plugin-Applications-Databases-Mssql

Badge +2

Thank you very much for your help. 😀
I have unzipped the “centreon_mmsql.pl” file that I got from the repository. 
I copied it to “/usr/lib/centreon/plugins” after renaming the basic one to .old.
And now everything is working again.
Thanks again for your help 😀

Userlevel 5
Badge +14

arg, beware this will prevent updates in the future (at least with yum/dnf, I don’t know on debian/ubuntu)

if you have custom files not coming from the rpm package, it won’t be overwritten at next update

 

you should use the package manager (yum/dnf or apt), you will need to delete the file you added manually,

then “uninstall” the package centreon-plugin-Applications-Databases-Mssql and reinstall it

(once the package has been updated, probably with the next plugin pack release in december or january)

 

 

Reply