How can I monitor apache server with zabbix - zabbix

I'm trying to monitor an apache server installed on Ubuntu 14.04 server with zabbix, but does not have a template to do. I want to get metric of active members with currents.

While it isn't clear what is "active members with currents", I assume that's not basic webserver availability, which you could monitor with Zabbix agent items like proc.num, net.tcp.service and the built-in webmonitoring.
To monitor Apache requests served and other statistics, this howto provides some ideas, as well as a script and a template you could start from: https://www.zabbix.org/wiki/Docs/howto/apache_monitoring_script

The new Zabbix 4.4 comes with a native template to monitor Apache.

Related

Couchbase CLI/REST to get cluster current settings

Im trying to find a way to monitor couchbase cluster settings such as memory, email configurations, etc.
Ideally it would be a cli/REST command that describes entire cluster configurations or its particular components.
Couchbase version: 4.5.1- Community Edition
Will appreciate for any advice.
In current CB versions, you can get the email info using http://hostname:8091/settings/alerts and memory info using http://hostname:8091/pools/nodes
For some reason, I cannot seem to access the CB archived documentation to confirm this. Try it out and see if these APIs are available in 4.5.x. The pools API should be available. Not sure on the alerts API.

Express app not accessible sometimes only for some users

The app is not accessible sometimes but only for some users. In the same LAN also, some users can access but some cannot.
The web app was designed with following technologies
Node
Angular
Express
MySql.
It's hosted in AWS EC2, MySql is also installed on the same EC2 instance.
I have no idea how this is happening. The server was running all the time.
This eror is not related your application - it's just that domain can not be resolved. You should check your DNS setting on server and on clients. See also instruction here, for example.

How to send logs to Zabbix from Dokku?

I would like to use Dokku for deploying my Rails apps. But I cannot find any method allows me to send the log to Zabbix? Does anyone have ideas? Thanks!
You can't send logs directly to Zabbix for it's not a log collector.
You need a Zabbix Agent installed to your app machine to analyze logs and trigger events or, if you are using a PaaS, you should implement web scenarios on your Zabbix Server to check specific URLs.
If you want to collect logs instead, you could implement a ELK stack.
Elastic search has its own alerting module but it's paid and IMHO Zabbix alerting is far better.

Using zabbix_sender for host discovery

I'm writing an application which delivers data from remote devices over an HTTP API. These devices are on a mobile data connection and have limited resources.
I wish to receive custom monitoring data over the HTTP API, relying on the security model designed in the application, and push that data to Zabbix directly (or indirectly) from node.js. I do not wish to use Zabbix Agent on the remote devices.
I see that I can use zabbix_sender to send data to a Zabbix server containing a pre-configured host. This works great. I intend to deliver monitoring data over my custom API, and when received give this data to zabbix_sender inside the server network.
The problem is there are many devices in the field and more are being added all the time.
TL;DR:
When zabbix_sender provides a custom hostname which doesn't exist in Zabbix already, it fails.
I would like to auto-add discovered hosts, based upon new hostnames from zabbix_sender. How would I do this?
Also, extra respect if anyone can give examples of how to avoid zabbix_sender and send data directly from node.js to the Zabbix server. I mean: suggest an NPM package that you have experience using. (Update: Found working node.js package here: https://www.npmjs.com/package/node-zabbix-sender)
Zabbix configuration: I'm learning from Zabbix 2.4 installed in Docker, no custom configuration from this Dockerhub: https://hub.docker.com/r/zabbix/zabbix-2.4/
Probably the best would be to use the Zabbix API to create hosts directly.
Alternatively, you could set up an action and emulate active agent connection, which would make Zabbix create the host via the active agent auto-regstration.
You could also use low level discovery (LLD) to send in JSON, which would result in hosts/items being created, based on prototypes.
In all of these cases you have to wait for one minute (by default) for the hosts to appear in the Zabbix cache, then you can send the data.
Also note that Zabbix 2.4 is not supported anymore, it will receive no fixes - it is not a "long-term support" release.

django in product , what are the mandatory services?

I am new to django/apache environment. I am preparing the list of services that are mandatory to get django application running without fail.
I could able to get only two of them in my mind.
1) mysqld -> mysql Daemon.
2) apache2 -> apache daemon.
Could you kindly suggest if any other services required, otherwise the django application fails to run?
you need apache2 mod-wgsi to be installed too:
$ sudo apt-get install libapache2-mod-wsgi
and you have to enable apache2 services:
$ sudo a2enmod mod-wsgi
and disable the default site too
and pass to the apache2 configuration and other
django is a framework; a set of tools that allow you to create web applications - any kind of web application.
There are no list of services required; but if you are asking from a systems management point of view; what is needed to support a typical Python web application:
You need a WSGI compatible runtime. This can be mod_wsgi if you are using Apache; gunicorn or uwsgi.
You may need a process manager if you aren't using mod_wsgi (whose processes are controlled by Apache).
You'll need a web server capable of hosting the static assets for the application. This can be Apache, nginx, lighttpd or any other capable web server.
Most applications will also have some sort of database. What database this is, will depend on the application and its requirements (not all features of the django ORM are supported by all databases). So you'll have to check with each individual application. You may choose to provide a "standard" layout; for example MySQL version xx.yy. It could also be that the application is using an external hosted server; in which case your job is just to provide connectivity to the remote hosts.
If you can take care of the above 4, you have a standard layout for host most Python WSGI-based web applications.
Keep in mind that although Python 3 has been widely available; most libraries are still in the process of being ported so making sure your server provides both Python 2.7 and Python 3 runtimes is important.
You should also make sure that the development headers for Python (and the database server you are supporting) are available - this is important if the Python application runs in a virtual environment (as this is best practice) since the drivers will need to be compiled for each virtual environment. The same also applies for any compiled libraries (like PIL).
Django has a nice deployment section in the documentation to help with specifics.