Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Drbd regex miss-match

Drbd regex miss-match

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 8.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    aron
    wrote on last edited by
    #1

    Hello

    We are in the process of provisioning drbd and was looking to use nxagent to monitor it. It appears that the drbd status no longer matches with the expected regex strings in the agent.

    I will try see if I can find the correct implementation string.

    Regards

    Example from: http://www.drbd.org/users-guide-8.3/s-first-time-up.html

    cat /proc/drbd
    version: 8.3.0 (api:88/proto:86-89)
    GIT-hash: 9ba8b93e24d842f0dd3fb1f9b90e8348ddb95829 build by buildsystem@linbit, 2008-12-18 16:02:26
     1: cs:Connected ro:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
        ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:200768

    Live from a deployment;
    cat /proc/drbd
    version: 8.3.11 (api:88/proto:86-96)
    srcversion: 21CA73FE6D7D9C67B0C6AB2

     1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
        ns:1081844 nr:0 dw:33336 dr:1051434 al:13 bm:64 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

    1 Reply Last reply
    0
    • A
      A
      aron
      wrote on last edited by
      #2
             if (regcomp(&pregVersion, "version: (.*) \\(api\\:([0-9].*)\\/proto\\:([0-9\\-].*)\\)", REG_EXTENDED) != 0)
                      return false;
      
      
              if (regcomp(&pregDevice, "^[[:space:]]*([0-9]+)\\: cs\\:(.*) ro\\:(.*)\\/(.*) ds\\:(.*)\\/(.*) ([A-Z]).*", REG_EXTENDED) != 0)
      

      This works with the exception of proto:86-89 reporting that it is 86. However trying to implement [//d-] or it does not seem to get the extended value. However to a large extent it is now working.

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi!

        I've changed the drbd.cpp (protocol version should also work as expected). These changes are included in 1.2.10 release. Thank you for fixing it!

        Best regards,
        Victor

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups