npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sematext-agent-httpd

v2.0.7

Published

SPM Agent for monitoring Apache httpd

Downloads

34

Readme

Build Status

This is the Apache httpd monitoring Agent for Sematext Monitoring

Preparation

  1. Get a free account at sematext.com/spm

  2. Create a Monitoring App of type "Apache" and copy the Application Token - or execute the commands displayed in the Sematext UI (which are described here as well)

  3. Install Node.js on your Apache httpd server

  4. Activate Apache mod_status module with sudo a2enmod status and configure it in the file /etc/apache2/mods-enabled/status.conf:

<Location /server-status>
                SetHandler server-status
</Location>

Optional preparation for PHP FastCGI Process Manager (FPM): To add monitoring for PHP-FPM follow this instructions.

Setup

# Install sematext-agent-httpd 
npm i sematext/sematext-agent-httpd -g
# If you use Sematext Cloud EU, set region for API endpoints
# sematext-httpd-setup  -r EU
# Install systemd or upstart service file for sematext-agent-httpd 
sematext-httpd-setup -t YOUR_SPM_TOKEN_HERE -u http://localhost/server-status

Configuration

The setup script stores the configuration in /etc/sematext/sematext-agent-httpd.config

In case you want to change settings later edit /etc/sematext/sematext-agent-httpd.config. Restart the Sematext Apache Agent after config changes, depending on the init system:

  • Upstart (Ubuntu):
    sudo service sematext-agent-httpd restart 
  • Systemd (Linux others):
    sudo systemctl stop sematext-agent-httpd
    sudo systemctl start sematext-agent-httpd
  • Launchd (Mac OS X):
    sudo launchctl stop com.sematext.sematext-agent-httpd
    sudo launchctl stop com.sematext.sematext-agent-httpd

For tests you can just run the agent from command line:

sematext-agent-httpd --config /etc/sematext/sematext-agent-httpd.config

Results

Apache Metrics in SPM:

Docker

Sematext Agent for Apache includes a docker file and startup script to build a Docker image.

git clone https://github.com/sematext/sematext-agent-apache.git
cd sematext-agent-apache
docker build -t sematext/sematext-agent-apache .

The Sematext Apache Agent supports following parameters on Docker:

| Environment Variable | Description | |----------------------|-------------| | Required parameters | | | SPM_TOKEN | your SPM Token for the Apache SPM App | | HTTPD_STATUS_URL | the URL to httpd server, delivering the stats (see httpd configuration above). Please note the servername/ip must be reachable from the agent container. You might need to use --link Apache container-name to create the network link. | | Optional parameters | | | PHP_FPM_STATUS_URL | PHP FastCGI status url | | HTTPS_PROXY | Url to HTTPS proxy if the agent runs behind a firewall | | SPM_RECEIVER_URL | Optional for SPM On-Premises, default value: https://spm-receiver.sematext.com:443/receiver/v1/_bulk | | EVENTS_RECEIVER_URL | Optional for SPM On-Premises, default value: https://event-receiver.sematext.com |

Example:

docker run --name sematext-agent-httpd -e SPM_TOKEN=YOUR_SPM_APACHE_TOKEN_HERE  \ 
-e HTTPD_STATUS_URL=http://httpd-server/server-status \ 
-d  sematext/sematext-agent-httpd

Support