Posts by qd_056

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

    Hello all


    I got a strange problem, I defined a new host in hosts.conf shows as below, but when I reload icinga2, error comes


    object Host "ctu01" {

    import "snmp-host"

    address = "ctu01"

    vars.agent = "snmp"

    vars.network_interfaces = ["VL152"]

    }


    Dec 25 01:16:35 ICINGA2 icinga2[15085]: /etc/icinga2/conf.d/hosts.conf(20): object Host "ctu01" {

    Dec 25 01:16:35 ICINGA2 icinga2[15085]: /etc/icinga2/conf.d/hosts.conf(21): import "snmp-host"

    Dec 25 01:16:35 ICINGA2 icinga2[15085]: ^^^^^^^^^^^^^^^^^^

    Dec 25 01:16:35 ICINGA2 icinga2[15085]: /etc/icinga2/conf.d/hosts.conf(22): address = "ctu01"

    Dec 25 01:16:35 ICINGA2 icinga2[15085]: /etc/icinga2/conf.d/hosts.conf(23): vars.agent = "snmp"

    Dec 25 01:16:35 ICINGA2 icinga2[15085]: [2017-12-25 01:16:35 -0500] critical/config: 1 error

    Dec 25 01:16:35 ICINGA2 systemd[1]: icinga2.service: control process exited, code=exited status=1

    Dec 25 01:16:35 ICINGA2 systemd[1]: Failed to start Icinga host/service/network monitoring system.

    Dec 25 01:16:35 ICINGA2 systemd[1]: Unit icinga2.service entered failed state.

    Dec 25 01:16:35 ICINGA2 systemd[1]: icinga2.service failed.


    the ICINGA2 version is 2.5.0 and the above configuration on version 2.4.1 is working well.


    Thanks

    Hello all


    PNP was just installed by below steps on my CentOS 7, but encounter below issue. Can someone help? Appreciate.


    Issue


    Steps


    1. yum install pnp4nagios
    2. icinga2 feature enable perfdata
    3. vi /etc/pnp4nagios/npcd.cfg
    4. user = icinga
    5. group = icinga
    6. #perfdata_spool_dir = /var/spool/pnp4nagios
    7. perfdata_spool_dir = /var/spool/icinga2/perfdata
    8. cd /var/lib
    9. chown -R icinga:icinga pnp4nagios
    10. cd /etc/init.d/
    11. systemctl enable npcd
    12. systemctl restart npcd
    13. systemctl restart icinga2
    14. cd /usr/share/icingaweb2/modules
    15. wget https://github.com/Icinga/icin…le-pnp/archive/v1.1.0.zip
    16. unzip v1.1.0.zip
    17. mv icingaweb2-module-pnp-1.1.0 pnp
    18. icingacli module enable pnp


    Thanks

    hello


    When I monitor disk C of a windows server, I use below configuration and it works.


    object Service "DiskUsage" {

    import "generic-service"

    check_command = "nscp"

    host_name = "Windows_Server"

    vars.nscp_variable = "USEDDISKSPACE"

    vars.nscp_params = "c"

    vars.nscp_warn = 85

    vars.nscp_crit = 90

    }


    But I have a few windows servers and some windows servers have more than one disk, such disk D, E, ,F, etc

    How can I make above configuration applicable for all the windows servers?


    Thanks

    hello Guys,


    I can see the graph of each services without manually adding.


    But there is another problem, compared with graphs in grafana, this is no "Unit" and "pl" parameters.




    And I tried to manually add the graphs, but the same problem still exists.


    Below is my module configuration


    Can someone provide any ideas?


    Thanks in advance

    hello


    When I check with command manually, there are result generated.


    root@ip-172-16-115-17:/usr/lib/nagios/plugins# ./check_nrpe -H 172.16.201.0 -c check_drivesize

    OK All 1 drive(s) are ok|'C:\ used'=18.42268GB;23.72499;26.69062;0;29.65624 'C:\ used %'=62%;80;90;0;100


    root@ip-172-16-115-17:/usr/lib/nagios/plugins# ./check_nrpe -H 172.16.201.0 -c check_cpu

    OK: CPU load is ok.|'total 5m'=0%;80;90 'total 1m'=0%;80;90 'total 5s'=0%;80;90


    Thanks

    Hello guys,


    When I use nrpe to monitor the Disk/Memory/CPU utilization for my windows servers, the problem I get is, missing graph.


    the service.conf configuration shows in below


    apply Service "WinDisk" {


    import "system-service"

    check_command = "nrpe"

    vars.host = "$host.address$"

    vars.nrpe_command = "check_drivesize"

    # vars.nrpe_arguments = ["10%!5%"]

    vars.notification["mail"] = {

    groups = [ "icingaadmins" ]

    }


    assign where host.vars.windisk


    }


    apply Service "WinCPU" {


    import "system-service"

    check_command = "nrpe"

    vars.host = "$host.address$"

    vars.nrpe_command = "check_cpu"

    # vars.nrpe_arguments = "drive=*"

    vars.notification["mail"] = {

    groups = [ "icingaadmins" ]

    }


    assign where host.vars.wincpu


    }


    apply Service "WinMEM" {


    import "system-service"

    check_command = "nrpe"

    vars.host = "$host.address$"

    vars.nrpe_command = "check_memory"

    # vars.nrpe_arguments = "drive=*"

    vars.notification["mail"] = {

    groups = [ "icingaadmins" ]

    }


    assign where host.vars.winmem


    }


    and seems like pnp4nagios is using default template to display the graph


    for the check_cpu, I've put a template "check_cpu.php" to folder /usr/share/pnp4nagios/html/templates.dist

    but still does not have graph display.


    Can someone help to educate how to fix this?



    Appreciate!

    and if I specify the org name and role,


    [auth.anonymous]

    enabled = true

    org_name = Koebbes

    org_role = Viewer


    error message shows as below



    First parameter must either be an object or the name of an existing class


    hello Mikesch


    [grafana]

    host = "127.0.0.1:3000"

    protocol = "http"

    height = "280"

    width = "640"

    enableLink = "yes"

    defaultdashboard = "icinga2-default"

    defaultdashboardstore = "db"

    datasource = "influxdb"

    accessmode = "proxy"

    shadows = "1"

    theme = "light"

    authanon = "yes"

    usepublic = "no"


    I followed below instruction to integrate grafana module.


    Thanks

    hello,


    Thanks to @davidsch and @dnsmichi for your feedback, after php-curl was installed, the new error comes.

    grafana module version is v1.1.7 and my OS is ubuntu 16.04



    First parameter must either be an object or the name of an existing class


    Hello Guys,


    I think I get the same issue with version

    Code
    1. https://github.com/Mikesch-mp/icingaweb2-module-grafana/archive/v1.1.8.zip


    Graphs are available in grafana, but errors shows in icingaweb as below



    Fatal error: Uncaught Error: Call to undefined function Icinga\Module\Grafana\ProvidedHook\curl_init() in /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php:221 Stack trace: #0 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(372): Icinga\Module\Grafana\ProvidedHook\Grapher->getMyPreviewHtml('hostalive', 'ip-172-16-115-1...', '') #1 zend.view:///usr/share/icingaweb2/modules/monitoring/application/views/scripts/show/components/grapher.phtml(2): Icinga\Module\Grafana\ProvidedHook\Grapher->getPreviewHtml(Object(Icinga\Module\Monitoring\Object\Host)) #2 /usr/share/php/Icinga/Web/View.php(231): include('zend.view:///us...') #3 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run('/usr/share/icin...') #4 zend.view:///usr/share/icingaweb2/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml(3): Zend_View_Abstract->render(NULL) #5 /usr/share/php/Icinga/Web/View.php(231): include('zend.view:///us...') #6 /usr/s in /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php on line 221