Posts by ceriada1

This forum was archived to /woltlab and is now in read-only mode.

    First i create a automation User inside Check_MK

    Code
    1. 'automation': {'alias': u'automation',
    2. 'automation_secret': 'SEKHCMSHYBXQOSPXLTNL',
    3. 'force_authuser': False,
    4. 'force_authuser_webservice': False,
    5. 'locked': False,
    6. 'roles': ['guest'],
    7. 'start_url': 'dashboard.py'},


    Then i create the backend inside Nagvis

    Code
    1. [backend_BI]
    2. backendtype="mkbi"
    3. base_url="http://172.16.26.90/test/check_mk/"
    4. auth_user="automation"
    5. auth_secret="SEKHCMSHYBXQOSPXLTNL"


    Now i create a new map and add a aggregation object. Thats all.
    For testing it is enough to switch on the included aggregation rules.

    Hi Yogibar,
    Ok, the standard question :


    Nagios version?
    Check Mk version?
    Nagvis version?


    Regards
    David

    ceriada1 : The contents of your screenshot look ok. Please try to fetch this URL from you monitoring host directly e.g. by running "wget -O - [address]" on the command line and test whether or not the result is also OK.

    Hi LaMi,
    Thank you for your answer. I have tried your suggest and these are the output with two different way :



    First way without passing the nagios user:


    it was stopped on "Authorization failed" and after pressing CTRL+C it have gone forward with magenta output :



    [root@SLNAGLAB03 ~]# wget -O - http://10.1.2.134/check_mk/view.py?view_name=aggr_all_api&output_format=json&_username=nagvis&_secret=DWSIGFXCRTJDXCOHOVFW
    [2] 7093
    [3] 7094
    [4] 7095
    [root@SLNAGLAB03 ~]# --2015-05-04 11:07:25-- http://10.1.2.134/check_mk/view.py?view_name=aggr_all_api
    Connecting to 10.1.2.134:80... connected.
    HTTP request sent, awaiting response... 401 Authorization Required
    Authorization failed.
    ^C
    [2] Exit 6 wget -O - http://10.1.2.134/check_mk/view.py?view_name=aggr_all_api
    [3] Done output_format=json
    [4]- Done _username=nagvis


    --------------------------


    Second way passing nagios user :


    [root@SLNAGLAB03 ~]# wget --user=nagiosadmin --ask-password -O - http://10.1.2.134/check_mk/view.py?view_name=aggr_all_api&output_format=json&_username=nagvis&_secret=DWSIGFXCRTJDXCOHOVFW
    [2] 7320
    [3] 7321
    [4] 7322


    It seems that second way work better than first. Any suggest?
    Regards
    David

    Hi Benni,
    I've the same problem and, after trying many times, i have added the backend manually in the file nagvis.ini.php like below but, unfortunately, i'm not sure was corret because i was not able to add and aggragtion object



    [backend_mkbi_1]
    backendtype="mkbi"
    base_url="http://10.1.2.134/check_mk/"
    auth_user="nagvis"
    auth_secret="DWSIGFXCRTJDXCOHOVFW"


    Maybe LaMi can hel you.
    Regards
    David

    What NagVis is doing there is to call this URL:


    [BASE_URL]view.py?view_name=aggr_all_api&output_format=json&_username=[USER}&_secret=[SECRET]


    Please replace the macros with the things you configured in your backend, then open the URL in your browser and paste the response here.

    Hi LaMi,


    I've the same problem : i'm using nagios+checkMK and i have configured a BI view into Nagios. I'd like to show this view using Nagvis 1.8.
    First, with some problem, i have added the new Backend (mkbi) but i have modified by hand (because using GUI always fail) the file nagvis.ini.php and below you can find (for your check) the BackEnd Section; then i have modified the file /usr/share/check_mk/web/plugins/views/builtin.py because was missing for code aggr_all_api. After restarting nagios, httpd i have tried to add the "aggregation" object to the map (regular map) without success but using your command above it seems that i was able to query nagios BI (attach), isn't it?
    Any help was aprreciated, thanks.
    Regards


    nagvis.ini.php - BackEnd Section



    ; ----------------------------
    ; Backend definitions
    ; ----------------------------


    ; Example definition of a livestatus backend.
    ; In this case the backend_id is live_1
    ; The path /usr/local/nagios/var/rw has to exist
    [backend_live_1]
    backendtype="mklivestatus"
    ; The status host can be used to prevent annoying timeouts when a backend is not
    ; reachable. This is only useful in multi backend setups.
    ;
    ; It works as follows: The assumption is that there is a "local" backend which
    ; monitors the host of the "remote" backend. When the remote backend host is
    ; reported as UP the backend is queried as normal.
    ; When the remote backend host is reported as "DOWN" or "UNREACHABLE" NagVis won't
    ; try to connect to the backend anymore until the backend host gets available again.
    ;
    ; The statushost needs to be given in the following format:
    ; ":" -> e.g. "live_2:nagios"
    ;statushost=""
    socket="unix:/var/log/nagios/rw/live"


    [backend_mkbi_1]
    backendtype="mkbi"
    base_url="http://10.1.2.134/check_mk/"
    auth_user="nagvis"
    auth_secret="DWSIGFXCRTJDXCOHOVFW"


    ; Example definition for a MySQL backend
    ; in this example the ID of the Backend is "ndomy_1" you can define another ID.
    [backend_ndomy_1]
    ; type of backend - MUST be set
    backendtype="ndomy"
    ; The status host can be used to prevent annoying timeouts when a backend is not
    ; reachable. This is only useful in multi backend setups.
    ;
    ; It works as follows: The assumption is that there is a "local" backend which
    ; monitors the host of the "remote" backend. When the remote backend host is
    ; reported as UP the backend is queried as normal.
    ; When the remote backend host is reported as "DOWN" or "UNREACHABLE" NagVis won't
    ; try to connect to the backend anymore until the backend host gets available again.
    ;
    ; The statushost needs to be given in the following format:
    ; ":" -> e.g. "live_2:nagios"
    ;statushost=""
    ; hostname for NDO-db
    ;dbhost="localhost"
    ; portname for NDO-db
    ;dbport=3306
    ; database name for NDO-db
    ;dbname="nagios"
    ; username for NDO-db
    ;dbuser="root"
    ; password for NDO-db
    ;dbpass=""
    ; prefix for tables in NDO-db
    ;dbprefix="nagios_"
    ; instance name for tables in NDO-db
    ;dbinstancename="default"
    ; maximum delay of the NDO Database in seconds
    ;maxtimewithoutupdate=180