Code Monkey home page Code Monkey logo

Comments (15)

kylexlau avatar kylexlau commented on July 18, 2024 2

I have the same problem with the latest version.

I searched a solution from here, it works for me.

The behavior of either dbd::sybase or freetds changed (this error message appeared suddenly at the beginning of this year and only with certain linux distributions)

You have to add "--commit"。

Gerhard

from check_mssql_health.

rajav2 avatar rajav2 commented on July 18, 2024

BTW it had the same problem with Version 1.5.19.3

from check_mssql_health.

nE0sIghT avatar nE0sIghT commented on July 18, 2024

Same with 1.5.20.6

from check_mssql_health.

kylexlau avatar kylexlau commented on July 18, 2024

There's another solution. When you install DBD-Sybase module, choose 'N' when asked to use 'CHAINED' mode by default.

By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where available)
when 'AutoCommit' is turned off. Versions 1.04 and older instead managed
the transactions explicitly with a 'BEGIN TRAN' before the first DML
statement. Using the 'CHAINED' mode is preferable as it is the way that
Sybase implements AutoCommit handling for both its ODBC and JDBC drivers.

Use 'CHAINED' mode by default (Y/N) [Y]: N

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

I have the same problem with the latest version.

I searched a solution from here, it works for me.

The behavior of either dbd::sybase or freetds changed (this error message appeared suddenly at the beginning of this year and only with certain linux distributions)
You have to add "--commit"。
Gerhard

I'm not authorised to read this forum. I created an account and I still can't.
Can u help me?

from check_mssql_health.

lausser avatar lausser commented on July 18, 2024

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

I have no access to this forum, it is for customers of Nagios Inc. Adding --commit by default is the way to go. Gerhard Von: Rerhinson [mailto:[email protected]] Gesendet: Dienstag, 10. November 2020 19:15 An: lausser/check_mssql_health [email protected] Cc: Subscribed [email protected] Betreff: Re: [lausser/check_mssql_health] Transaction Error when running check_mssql_health (#7) I have the same problem with the latest version. I searched a solution from here https://support.nagios.com/forum/viewtopic.php?f=6&t=28718 , it works for me. The behavior of either dbd::sybase or freetds changed (this error message appeared suddenly at the beginning of this year and only with certain linux distributions) You have to add "--commit"。 Gerhard I'm not authorised to read this forum. I created an account and I still can't. Can u help me? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#7 (comment)> , or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQSODR2IS2H22DMSIQVQLSPF7JNANCNFSM4ARYAVSA .

The check passes, but does not collect the correct information it should.
It returns OK status, but it is a false positive.

from check_mssql_health.

lausser avatar lausser commented on July 18, 2024

"The check passes,"
Which check?

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

It is a backup check, it should return to the status information with the time of the last backup but it only comes with "ok".

Like this =>
image

from check_mssql_health.

lausser avatar lausser commented on July 18, 2024

How do you think i can help you with nothing more than a screenshot and "Shows OK, but is false positive" at hand?

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

Sorry, I just wanted to show you how it was being shown.

image

DBD::Sybase::db DESTROY failed: Server message number=3903 severity=16 state=1 line=2 server=CLIG525 text=The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. Server message number=3903 severity=16 state=1 line=2 server=CLIG525 text=The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. during global destruction.
(in cleanup) DBD::Sybase::db DESTROY failed: Server message number=3903 severity=16 state=1 line=2 server=CLIG525 text=The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. Server message number=3903 severity=16 state=1 line=2 server=CLIG525 text=The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. during global destruction.

from check_mssql_health.

lausser avatar lausser commented on July 18, 2024

You see the sql communication when you add "-vvv" to the command line.

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

[nagios@nagios ~]$ /usr/local/nagios/libexec/check_mssql_health --server 10.0.0. --username nagios_secrel --password "S1" --mode database-backup-age --warning 24 --critical 48 --name msdb --commit -vvv
Wed Nov 11 10:34:43 2020: SQL:
SELECT @@Version
ARGS:
$VAR1 = [];

Wed Nov 11 10:34:43 2020: RESULT:
$VAR1 = [
'Microsoft SQL Server 2014 - 12.0.4100.1 (X64)
Apr 20 2015 17:29:27
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)
'
];

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::override_opt

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::check_messages

Wed Nov 11 10:34:43 2020: SQL:
SELECT SYSTEM_USER
ARGS:
$VAR1 = [];

Wed Nov 11 10:34:43 2020: RESULT:
$VAR1 = [
'nagios_secrel'
];

Wed Nov 11 10:34:43 2020: SQL:
SELECT @@SERVICENAME
ARGS:
$VAR1 = [];

Wed Nov 11 10:34:43 2020: RESULT:
$VAR1 = [
'MSSQLSERVER'
];

Wed Nov 11 10:34:43 2020: SQL:
SELECT CAST(COALESCE(SERVERPROPERTY('IsHadrEnabled'), 0) as int)
ARGS:
$VAR1 = [];

Wed Nov 11 10:34:43 2020: RESULT:
$VAR1 = [
0
];

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::analyze_and_check_database_subsystem

Wed Nov 11 10:34:43 2020: SQL:

      SELECT
          d.name AS database_name, d.recovery_model, bs1.last_backup, bs1.last_duration, d.state, d.state_desc
      FROM
          sys.databases d
      LEFT JOIN (
        SELECT
            bs.database_name,
            DATEDIFF(HH, MAX(bs.backup_finish_date), GETDATE()) AS last_backup,
            DATEDIFF(MI, MAX(bs.backup_start_date), MAX(bs.backup_finish_date)) AS last_duration
        FROM
            msdb.dbo.backupset bs WITH (NOLOCK)
        WHERE
            bs.type IN ('D', 'I')
        GROUP BY
            bs.database_name
      ) bs1 ON
          d.name = bs1.database_name WHERE d.source_database_id IS NULL
      ORDER BY
          d.name

ARGS:
$VAR1 = [];

Wed Nov 11 10:34:43 2020: RESULT:
$VAR1 = [
[
'master',
3,
400,
0,
0,
'ONLINE'
],
[
'tempdb',
3,
undef,
undef,
0,
'ONLINE'
]
];

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::DatabaseStub::override_opt

Wed Nov 11 10:34:43 2020: $self->{components}->{database_subsystem} = Classes::MSSQL::Component::DatabaseSubsystem->new()
Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::check_database_subsystem

[DATABASESUBSYSTEM]
info: checking databases

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::reduce_messages_short

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::check_messages

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::check_messages

Wed Nov 11 10:34:43 2020: AUTOLOAD Classes::MSSQL::DBI::nagios_exit

OK -
checking databases

from check_mssql_health.

lausser avatar lausser commented on July 18, 2024

msdb is not among the sql response, probably not listed in msdb.dbo.backupset. So there is no backup configured for msdb?

from check_mssql_health.

Rerhinson avatar Rerhinson commented on July 18, 2024

There is a maintenance plan and I checked the bakcup. I check a table msdb.dbo.backupset.
So my doubt, I thought it would be some parameter.

from check_mssql_health.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.