Posts by kobazik

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

    Hi,


    I'm planning to create ServiceNow CMDB integration so that Director can sync hosts and host groups. ServiceNow supports a web service interface that operates on the JSON object as the data input and output format.


    https://wiki.servicenow.com/in…SON_Web_Service#gsc.tab=0


    https://wiki.servicenow.com/in…=Database_Views#gsc.tab=0


    What will be the best way to start writing a module for Director? Any examples of using php and json with Director?


    Thanks


    Dom

    Omg it was include_recursive "conf.d" missing in /etc/icinga2/icinga2.conf :)


    Looks like puppet-icinga2-rewrite module generates a config without conf.d include by default as in their hiera example.


    All I had to to do is change icinga2::confd: false to icinga2::confd: true in my hiera host file.



    curl -k -s -u root:cb44d833ecbbffed 'https://localhost:5665/v1'

    Code
    1. [2016-11-07 11:55:56 +0000] information/ApiListener: New client connection from [127.0.0.1]:47638 (no client certificate)
    2. [2016-11-07 11:55:56 +0000] notice/ApiListener: New HTTP client
    3. [2016-11-07 11:55:56 +0000] debug/HttpRequest: line: GET /v1 HTTP/1.1, tokens: 3
    4. [2016-11-07 11:55:56 +0000] notice/WorkQueue: Spawning WorkQueue threads for 'HttpServerConnection'
    5. [2016-11-07 11:55:56 +0000] information/HttpServerConnection: Request: GET /v1 (from [127.0.0.1]:47638, user: <unauthenticated>)
    6. [2016-11-07 11:55:56 +0000] warning/HttpServerConnection: Unauthorized request: GET /v1
    7. [2016-11-07 11:55:56 +0000] debug/HttpServerConnection: Http client disconnected
    8. [2016-11-07 11:55:56 +0000] notice/WorkQueue: Stopped WorkQueue threads for 'HttpServerConnection'
    Code
    1. [2016-11-07 11:24:58 +0000] information/ApiListener: New client connection from [127.0.0.1]:33896 (no client certificate)
    2. [2016-11-07 11:24:58 +0000] notice/ApiListener: New HTTP client
    3. [2016-11-07 11:24:58 +0000] debug/HttpRequest: line: GET /v1 HTTP/1.1, tokens: 3
    4. [2016-11-07 11:24:58 +0000] notice/WorkQueue: Spawning WorkQueue threads for 'HttpServerConnection'
    5. [2016-11-07 11:24:58 +0000] information/HttpServerConnection: Request: GET /v1 (from [127.0.0.1]:33896, user: <unauthenticated>)
    6. [2016-11-07 11:24:58 +0000] warning/HttpServerConnection: Unauthorized request: GET /v1
    7. [2016-11-07 11:24:58 +0000] debug/HttpServerConnection: Http client disconnected
    8. [2016-11-07 11:24:58 +0000] notice/WorkQueue: Stopped WorkQueue threads for 'HttpServerConnection'

    I just tried a fresh icinga2 installation followed by icinga2 api setup on another host and all works fine. Surely there is something wrong on this server.


    Just tried removing certs and generated new ones followed by api setup but still no joy.



    it is enabled and I also run icinga2 api setup. I'm running icinga2-2.5.4-1.el7.centos.x86_64


    Code
    1. root:/etc/icinga2> icinga2 feature list
    2. Disabled features: debuglog gelf graphite influxdb livestatus opentsdb perfdata syslog
    3. Enabled features: api checker command compatlog ido-mysql mainlog notification statusdata

    Master zone was created using puppet-icinga2-rewrite module

    Hi,


    I've added test api user to icinga2 but for some reason it does't work. What am I missing?


    Code
    1. root:/etc/icinga2/conf.d> cat api-users.conf
    2. object ApiUser "director" {
    3. password = "test"
    4. permissions = [ "*" ]
    5. }
    Code
    1. root:/etc/icinga2/conf.d> curl -k -s -u director:test 'https://localhost:5665/v1'
    2. <h1>Unauthorized</h1>
    Code: /var/log/icinga2/icinga2.log
    1. [2016-11-04 16:54:09 +0000] information/HttpServerConnection: Request: GET /v1 (from [127.0.0.1]:58064, user: <unauthenticated>)
    2. [2016-11-04 16:54:09 +0000] warning/HttpServerConnection: Unauthorized request: GET /v1

    Hi,


    I'm looking in to setting up icinga2 cluster with to masters. I have hosts that will send snmp traps. How would you go about making snmptt in HA setup on both masters?


    I was thinking to place snmp trap service behind a load balancer which will detect if one of icinga2 masters is down and direct traffic to the other master. This won't cover for a scenario when both masters are up but snmptt service is down on of them.


    Has anyone run similar setup?


    Thanks


    Dom

    Hi,


    First of all well done with influxdb writer in icinga 2.5! I got my perfdata written to InfluxDB and I can display graphs in Grafana. Now, is there is a away to show same graphs in host/service page in icingaweb2? I know there is graphite module which does it? Is there is something like that for influxdb?


    Basically I would like to be able to see grafana/influxdb graphs in incingaweb2 as in attached picture.


    Thanks


    Dom

    I'm working on hubot script that can interact with icinga2 API for actions like: status, ack, downtime, show host problems, show service problems, show problems and more...


    I should have something ready this week and once I'm happy with it, I will publish it on github :)

    Hi, How did you manage to solve it?


    I've successfully configured icinga2 graphite writer and I can see metrics being graphed in both graphite-web and grafana but not in icingaweb2.


    Below are my configs:


    /etc/icingaweb2/modules/graphite/config.ini :


    [graphite]
    web_url = http://mytestserver


    mytestserver:root:/etc/icingaweb2/modules/graphite/templates> ll
    total 44
    -rwxr-sr-x. 1 root icingaweb2 178 May 13 13:21 disk.conf
    -rwxr-sr-x. 1 root icingaweb2 209 May 13 13:21 hostalive.conf
    -rwxr-sr-x. 1 root icingaweb2 180 May 13 13:21 http-size.conf
    -rwxr-sr-x. 1 root icingaweb2 147 May 13 13:21 http-time.conf
    -rwxr-sr-x. 1 root icingaweb2 301 May 13 13:21 icinga.conf
    -rwxr-sr-x. 1 root icingaweb2 218 May 13 13:21 load.conf
    -rwxr-sr-x. 1 root icingaweb2 183 May 13 13:21 ping4.conf
    -rwxr-sr-x. 1 root icingaweb2 150 May 13 13:21 procs.conf
    -rwxr-sr-x. 1 root icingaweb2 150 May 13 13:21 ssh.conf
    -rwxr-sr-x. 1 root icingaweb2 139 May 13 13:21 swap.conf
    -rwxr-sr-x. 1 root icingaweb2 133 May 13 13:21 templateset.ini


    Graphite icingaweb2 module is enable. I can see Graphite section under History but no templates are available. In addition if I go to to any service I can perfdata but no graph.


    I've attached few screenshots.


    Any ideas?


    Thanks


    Dom