Results 1 to 6 of 6

Thread: Anybody using perf-o-meter into Multisite?

  1. #1
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    Anybody using perf-o-meter into Multisite?

    Hi
    Anybody is using column "Perf-o-meter" into Multisite? can explain how to integrate?
    I tried to use them and not work...
    I don't know if this image http://www.shinken-monitoring.org/screenshots/ (image 5) is just a example from multisite web site or is using shinken ....
    I'm using it with checks who return a numeric value as perf data, as cpu usage, memory... and these counters are used ok at pnp4nagios
    Also there is no much doc at multisite's web about it

    thanks

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Anybody using perf-o-meter into Multisite?

    Performeters in multisite are reserved to check_mk agent data I think.
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    Re: Anybody using perf-o-meter into Multisite?

    Well,
    after a few investigation of multisite files I got some per-o-meters working with shinken data ;D
    I don't know too much of python but there are some examples at files

    /usr/local/check_mk/share/web/plugins/perfometer/active_checks.py and check_mk.py
    check_mk.py but it seems only valid for check_mk checks...

    at active_checks there are some examples how to define per-o-meters.. i tried to write some ones but didn't work but copied ones yes..
    only thing is write a line like this
    perfometers["my-command"] = perfometer_xxxxxx

    where my-command is shinken used command (as reported to UI, can be watched at check performance data) and perfometer_xxxxxxx is defined perfometer at this file..
    so, multisite links command with defined perfometer function and draws

    bye

  4. #4
    Could you pleaser open up a ticket on github (i will assign it to me then) I've not been using multisite for a long time (really) so did not see this evolution

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Posts
    2
    what a fine experience! To create a dual monitor in window 10 with the help of a nice site.
    It is very useful site where we can learn about window 10.if you want to learn how https://windowsclassroom.com/setup-d...ors-windows-10 to create a dual monitor you* you can can visit

  6. #6
    Junior Member
    Join Date
    Mar 2019
    Location
    Reston
    Posts
    3
    Quote Originally Posted by denetariko View Post
    Hi
    Anybody is using column "Perf-o-meter" into Multisite? can explain how to integrate?
    I tried to use them and not work...
    I don't know if this image http://www.shinken-monitoring.org/screenshots/ (image 5) is just a example from multisite web site or is using shinken ....
    I'm using it with checks who return a numeric value as perf data, as cpu usage, memory... and these counters are used ok at pnp4nagios
    Also there is no much doc at multisite's web about it

    thanks
    Here is method how I resolved this sproblem


    def perfometer_check_mk_uptime(row, check_command, perf_data):
    return 'Hello World! :-)', '<table><tr>' \
    + perfometer_td(20, '#fff') \
    + perfometer_td(80, '#ff0000') \
    + '</tr></table>'

    > Registering a Perf-O-Meter


    perfometers['check_mk-snmp_uptime'] = perfometer_check_mk_uptime


    > Debugging in Perf-O-Meters

    def perfometer_check_mk_uptime(row, check_command, perf_data):
    return repr(check_command), ''

    > def perfometer_check_mk_uptime(row, check_command, perf_data):
    return repr(perf_data), ''

    > perfometer_td

    perfometer_td(20, '#000000')

    > perfometer_linear

    perfometer_linear(65, '#00BB33')

    def perfometer_check_mk_printer_supply(row, check_command, perf_data):
    return repr(perf_data), ''

    perfometers["check_mk-printer_supply"] = perfometer_check_mk_printer_supply

    def perfometer_check_mk_printer_supply(row, check_command, perf_data):
    left = float(perf_data[0][1])
    warn = float(perf_data[0][3])
    crit = float(perf_data[0][4])
    if left <= crit:
    color = "#ff0000"
    elif left <= warn:
    color = "#ffff00"
    else:
    color = "#00ff00"

    return "%.0f%%" % left, perfometer_linear(left, color)

    perfometers["check_mk-printer_supply"] = perfometer_check_mk_printer_supply

    > perfometer_logarithmic

    def perfometer_check_mk_cpu_loads(row, check_command, perf_data):
    color = { 0: "#68f", 1: "#ff2", 2: "#f22", 3: "#fa2" }[row["service_state"]]
    load = float(perf_data[0][1])
    return "%.1f" % load, perfometer_logarithmic(load, 4, 2, color)

    perfometers["check_mk-cpu.loads"] = perfometer_check_mk_cpu_loads


    perfometer_logarithmic(value, half_value, base, color)


    That's it

    Have a nice day
    Top unblocked games 500 collection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •