Code Monkey home page Code Monkey logo

Comments (3)

JappeHallunken avatar JappeHallunken commented on July 29, 2024

I've got this working with labels, and I use ss, since netstatis deprecated.
Your web.status stuff looks right, so I guess the error happens maybe at the regexp?
Here my code for comparison:

dynamic.3.name=http
dynamic.3.source=ss -nltp
dynamic.3.regexp=LISTEN .+:(80).+
dynamic.3.default=0

web.status.1.content.1.line.2="<b>Lighttpd HTTP</b>: "+Label(data.http,"==80","listening","success")+Label(data.http,"!=80","not listening","danger")

EDIT:
I tested your regexp with RegExr and it's not working. It should be;

tcp .+:(21).*LISTEN

from rpi-monitor.

thygizmo avatar thygizmo commented on July 29, 2024

Hi! Thanks for the feedback and for your piece of code!
Actually the regexp is correct and matches the output of the netstat command!
However, I did not have in my configuration the "dynmic.x.default=0 value" and that made the whole difference!!!

Thank you for your feedback, I finally got it fully working!

Many thanks!
Giz

from rpi-monitor.

JappeHallunken avatar JappeHallunken commented on July 29, 2024

Nice that you found a solution.
It's a bit offtopic, but I'm still wondering about the regexp.
Because when I test this https://regexr.com/6ub3v, it doesn't match without the + and I don't understand why.

from rpi-monitor.

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.