Problem with apache2.sh plugin

Aravinth Anto t-aravinth at juspay.in
Tue Sep 4 09:11:23 CEST 2012


I'm very new to apache. I tried to enable the server status page of apache.

I added the `status.conf` and `status.load` to `mods-enabled` directory.

I changed the config of `apache2.conf` to include all `mods-enabled`
directory.

This is the config of `staus.conf`:


    <IfModule mod_status.c>
    #
    # Allow server status reports generated by mod_status,
    # with the URL of http://servername/server-status
    # Uncomment and change the "192.0.2.0/24" to allow access from other
hosts.
    #
    <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1 ::1
    #    Allow from 192.0.2.0/24
    </Location>

    # Keep track of extended status information for each request
    ExtendedStatus On

    # Determine if mod_status displays the first 63 characters of a request
or
    # the last 63, assuming the request itself is greater than 63 chars.
    # Default: Off
    #SeeRequestTail On


    <IfModule mod_proxy.c>
        # Show Proxy LoadBalancer status in mod_status
        ProxyStatus On
    </IfModule>


    </IfModule>

The default settings. I restarted my server.

And when I try `wget localhost/server-status --no-check-certificate` . I
get an `404` error message :

        --2012-09-04 07:04:08--  http://localhost/server-status
    Resolving localhost (localhost)... 127.0.0.1
    Connecting to localhost (localhost)|127.0.0.1|:80... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://localhost/server-status [following]
    --2012-09-04 07:04:08--  https://localhost/server-status
    Connecting to localhost (localhost)|127.0.0.1|:443... connected.
    WARNING: no certificate subject alternative name matches
    requested host name `localhost'.
    HTTP request sent, awaiting response... 404 Not Found
    2012-09-04 07:04:08 ERROR 404: Not Found.


I'm very new to apache. Where I went wrong?

Thanks in advance.


On Tue, Sep 4, 2012 at 12:27 PM, Claudio Kuenzler <ck at claudiokuenzler.com>wrote:

> Note that now you're accessing port 80, instead of 8443...
> Also before you use the plugin, you should make sure that you have
> correctly enabled mod_status and the server-status URL is accessible.
> You can test this with curl or lynx.
>
> e.g.:
> lynx localhost/server-status
>
> If this page is not shown, then the plugin won't work.
>
>
> On Tue, Sep 4, 2012 at 8:34 AM, Aravinth Anto <t-aravinth at juspay.in>wrote:
>
>>
>>
>> On Tue, Sep 4, 2012 at 11:47 AM, Claudio Kuenzler <ck at claudiokuenzler.com
>> > wrote:
>>
>>> Read the documentation. It says:
>>>
>>> -S|--secure)
>>> Enables HTTPS (no certificate check though). Default is: off
>>>
>>> Thanks for the reply. But Doing so:
>> $ ./check_apache2.sh -H localhost -S
>>
>> Gives me the same sort of error:
>>
>> (standard_in) 2: syntax error
>> OK - Apache serves  Requests per second with an average CPU utilization
>> of 2.4%. Busy workers: , idle:  | 'cpu_load'=2.4 'req_psec'= 'bytes_psec'=
>> 'bytes_preq'= 'workers_busy'= 'workers_idle'=
>>
>>
>>
>>> So the certificate is not checked.
>>> And if you manually check with curl, you should check the correct URL:
>>> curl https://localhost/server-status
>>>
>>> On Tue, Sep 4, 2012 at 8:13 AM, Aravinth Anto <t-aravinth at juspay.in>wrote:
>>>
>>>>  It seems that certificate verification is getting failed. I can do
>>>> something like this :
>>>>
>>>> curl https://localhost --insecure
>>>>
>>>> Which is returning the page. But in my case how do I specify the plugin
>>>> to not to use ssl certificate?
>>>>
>>>> Thanks in advance. Kindly help me out.
>>>>
>>>>
>>>> On Tue, Sep 4, 2012 at 11:28 AM, Aravinth Anto <t-aravinth at juspay.in>wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I downloaded the plugin from this page :
>>>>> http://exchange.nagios.org/directory/Plugins/Web-Servers/Apache/check_apache2-2Esh/details
>>>>>
>>>>>
>>>>> I tested in my local machine like this :
>>>>>
>>>>> ./check_apache2.sh -H https://localhost -P 8443
>>>>>
>>>>> I get an error like this:
>>>>>
>>>>> (standard_in) 2: syntax error
>>>>> OK - Apache serves  Requests per second with an average CPU
>>>>> utilization of 0.5%. Busy workers: , idle:  | 'cpu_load'=0.5 'req_psec'=
>>>>> 'bytes_psec'= 'bytes_preq'= 'workers_busy'= 'workers_idle'=
>>>>>
>>>>> Why there is an error stating `(standard_in) 2: syntax error`?
>>>>>
>>>>> Can anyone say me where I'm making the mistake?
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond.
>>>> Discussions
>>>> will include endpoint security, mobile security and the latest in
>>>> malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Nagios-users mailing list
>>>> Nagios-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>>> ::: Please include Nagios version, plugin version (-v) and OS when
>>>> reporting any issue.
>>>> ::: Messages without supporting info will risk being sent to /dev/null
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Nagios-users mailing list
>>> Nagios-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>> ::: Please include Nagios version, plugin version (-v) and OS when
>>> reporting any issue.
>>> ::: Messages without supporting info will risk being sent to /dev/null
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when
>> reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120904/f0e64a9e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list