Giter Club home page Giter Club logo

Comments (8)

till avatar till commented on August 31, 2024

Label is hard as each label blows up the storage requirements in prometheus. I am not sure if I am logging it though. Have you checked there?

from dnsbl_exporter.

zentavr avatar zentavr commented on August 31, 2024

@till we just have an information about if the resource blacklisted or not. That’s it.

from dnsbl_exporter.

till avatar till commented on August 31, 2024

@zentavr maybe logging the response? Would you be able to help with a PR?

from dnsbl_exporter.

zentavr avatar zentavr commented on August 31, 2024

@till I’m not so good with the Golang, but I can try that.

from dnsbl_exporter.

till avatar till commented on August 31, 2024

@zentavr I have to rebase my PR, but potentially it is already fixed (or at least I tried to):

if reason == nil {
logger.Error("error getting (first) reason: %s", strings.Join(res, ", "))
result.Error = true
result.ErrorType = fmt.Errorf("error getting the (first) reason: %s", strings.Join(res, ", "))
c <- result
return
}
// fetch (potential) reason
txt, err := r.util.GetTxtRecords(godnsbl.Reverse(reason) + "." + result.Rbl)
if err != nil {
logger.Error("error occurred fetching TXT record", slog.String("msg", err.Error()))
result.Error = true
result.ErrorType = err
c <- result
return
}
if len(txt) > 0 {
result.Text = strings.Join(txt, ", ")
}
c <- result

Do you have an example of a listed host that I can use?

from dnsbl_exporter.

zentavr avatar zentavr commented on August 31, 2024

from dnsbl_exporter.

till avatar till commented on August 31, 2024

@zentavr yeah, I guess. A logline, because the /metrics endpoint doesn't really suite itself to show errors.

from dnsbl_exporter.

till avatar till commented on August 31, 2024

Log line should be there now:

c.logger.Debug("listed?", slog.Int("v", metricValue), slog.String("rbl", check.Rbl), slog.String("reason", check.Text))

from dnsbl_exporter.

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.