Skip to content

Commit

Permalink
Merge branch 'master' into whip-publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
yashtandon113 authored Aug 7, 2024
2 parents 56a4903 + e572153 commit 6d84318
Show file tree
Hide file tree
Showing 852 changed files with 434 additions and 834 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ If the output of the above command returns a "valid" value, your license can be

#### 6. Add the settings for Ant Media Server.
```
echo "proxy.address=username:password@proxy.antmedia.io:80" >> /usr/local/antmedia/conf/red5.properties
echo "proxy.address=username:password@license-verification.antmedia.io:80" >> /usr/local/antmedia/conf/red5.properties
```
Finally, restart the Ant Media Server.
```
Expand Down
76 changes: 39 additions & 37 deletions docs/guides/monitoring/collecting-logs-from-ams-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,68 @@ The following example is for Ubuntu with a 4Gb RAM (minimum), however the same s

#### Prerequisites

In order to run Elasticsearch, you must install Java. Run the following commands to install.

- In order to run Elasticsearch, you must install Java. Run the following commands to install.
```sh
sudo apt-get update
sudo apt-get install apt-transport-https openjdk-11-jre openjdk-11-jre-headless uuid-runtime pwgen

``
### Step 1: Install MongoDB

MongoDB stores the configurations and meta information. Install MongoDB using the following commands.

- MongoDB stores the configurations and meta information. Install MongoDB using the following commands.
```sh
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu `lsb_release -cs`/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update && sudo apt-get install -y mongodb-org

Enable and restart MongoDB service by running the commands below.

```
- Enable and restart MongoDB service by running the commands below.
```sh
sudo systemctl enable mongod.service & sudo systemctl restart mongod.service

Make sure the service is running:

```
- Make sure the service is running:
```sh
sudo systemctl status mongod.service
```

### Step 2: Install Elasticsearch

Graylog can be used with Elasticsearch 7.x. Elasticsearch acts as a search server, requiring Graylog to work.

Install Elasticsearch using the following commands.

```sh
wget -O - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add
echo "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch-oss

```
Once the installation of Elasticsearch 7.x is complete, set the cluster name for Graylog.

Edit the following file:

```sh
vim /etc/elasticsearch/elasticsearch.yml

```
and then add the 2 lines below.

```echo
cluster.name: graylog
action.auto_create_index: false

```
Save the file and exit.

Enable and restart Elasticsearch service by running the commands below:

```sh
sudo systemctl enable elasticsearch.service
sudo systemctl restart elasticsearch.service

```
Make sure the service is running. To check the status of Elasticsearch, run the command below:

```sh
sudo systemctl status elasticsearch.service

```
Make sure everything is correct by running the following command:

```sh
curl -X GET http://localhost:9200
```

Output:
```
```echo
root@graylog:~# curl -X GET http://localhost:9200
{
"name" : "cdN0aJ1",
Expand All @@ -100,7 +102,7 @@ Output:
}
```
Make sure the output status is green.
```
```echo
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
{
Expand All @@ -126,19 +128,19 @@ Make sure the output status is green.
Graylog is a log parser. It collects logs from various inputs. Now that we have installed MongoDB and Elasticsearch, it is time to install Graylog.

Install Graylog using the following commands:
```
```sh
wget https://packages.graylog2.org/repo/packages/graylog-4.3-repository_latest.deb
sudo dpkg -i graylog-4.3-repository_latest.deb
sudo apt-get update && sudo apt-get install graylog-server -y
```
To create your **root\_password\_sha2** run the following command. You will need this password to login to the Graylog web interface.
```
```sh
echo -n "Enter Password: " && head -1 `</dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1
```
Output: ```8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92```

You will need to generate a secret to secure the user passwords. To generate the password\_secret, you can use the pwgen tool to do.
```
```sh
pwgen -N 1 -s 96
```
Output: ```jyOQ188lAq1ssEMvCndsj2ImEOuWkC4v3aL4AQg9Dj4wvavkk3BAkSzMXFyH8aN8GiMoIJl2xmT4T5aGwS1r06Cz38SMsgDK```
Expand All @@ -161,18 +163,18 @@ to
Save the file and exit.

Enable and restart Graylog Server service by running the commands below.
```
```sh
sudo systemctl enable graylog-server.service
sudo systemctl restart graylog-server.service
```
 Make sure the service is running.
```
```sh
sudo systemctl status graylog-server.service
```
#### Optional: Configuring Nginx reverse proxy with SSL termination

Run the following commands to install Nginx and certbot:
```
```sh
sudo apt install curl ca-certificates lsb-release -y
echo "deb http://nginx.org/packages/`lsb_release -d | awk '{print $2}' | tr '[:upper:]' '[:lower:]'` `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
Expand All @@ -181,19 +183,19 @@ Run the following commands to install Nginx and certbot:
sudo apt-get install nginx certbot python-certbot-nginx -y
```
 Run the following commands to create a certificate:
```
```sh
certbot --nginx -d yourdomain.com -d www.yourdomain.com
```
Edit crontab file crontab -e add below line to renew certificate each 80 days:
```
```sh
0 0 */80 * * root certbot -q renew --nginx
```
Backup default Nginx configuration.
```
```sh
mv /etc/nginx/conf.d/default.conf{,_bck}
```
Create a new file called **graylog.conf** and edit and save the following lines according to you.
```
```echo
vim /etc/nginx/conf.d/graylog.conf
server {
Expand All @@ -219,7 +221,7 @@ Create a new file called **graylog.conf** and edit and save the following lines
}
```
Save and exit the file then restart nginx service as follows:
```
```sh
systemctl restart nginx
```
Now you can reach to Graylog server as follows.
Expand All @@ -239,7 +241,7 @@ or
### Step 5: AMS log settings for Graylog

Login to your servers where Ant Media is installed with ssh and create **/etc/rsyslog.d/25-antmedia.conf** file then add the below lines:
```
```echo
$ModLoad imfile
$InputFileName /usr/local/antmedia/log/ant-media-server.log
$InputFileTag antmedia
Expand All @@ -248,7 +250,7 @@ Login to your servers where Ant Media is installed with ssh and create **/etc/rs
*.* @192.168.1.250:5144;RSYSLOG_SyslogProtocol23Format
```
Save and exit the file then restart rsyslog service.
```
```sh
sytemctl restart rsyslog
```
### Step 6: Configuring Graylog
Expand Down
11 changes: 6 additions & 5 deletions docs/guides/monitoring/monitoring-ams-with-datadog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ In this document, you'll learn how to monitor Ant Media Servers with Datadog. Fi
### Step 1 - Install Datadog

Firstly, you need to create a Datadog account in [this link](https://www.datadoghq.com/). After that just go ```Integrations / Agent``` section like this URL: ```https://app.datadoghq.com/account/settings#agent/ubuntu```. Select ```Ubuntu```. Run installation command as below:

```sh
DD_AGENT_MAJOR_VERSION=7 DD_API_KEY=XXXXXXXXXXXXXXXXXXXX DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
```sh
Check this link for more details: https://docs.datadoghq.com/agent/
Expand All @@ -22,15 +22,16 @@ Check this link for more details: https://docs.datadoghq.com/agent/
**Enable process monitoring:**
Edit ```process_config``` parameter in ```/etc/datadog-agent/datadog.yaml```
```echo
process_config:
enabled: 'true'

```

**Enable network performance monitoring:**
Create ```system-probe.yaml``` file with example settings.

```sh
sudo -u dd-agent cp /etc/datadog-agent/system-probe.yaml.example /etc/datadog-agent/system-probe.yaml
```

Add network config parameter in ```/etc/datadog-agent/system-probe.yaml```

Expand Down
Loading

0 comments on commit 6d84318

Please sign in to comment.