- Katılım
- 7 Eyl 2016
- Konular
- 12
- Mesajlar
- 59
- Online süresi
- 3d 16h
- Reaksiyon Skoru
- 42
- Altın Konu
- 0
- TM Yaşı
- 9 Yıl 9 Ay 12 Gün
- Başarım Puanı
- 77
- MmoLira
- 945
- DevLira
- 15
HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
GitHub:
The following tutorial is also available on the GitHub repository.
Metin2-InfluxDB
The purpose of this is to be able to create dashboards with the timeseries statistics, like the ones seen on the video made with Grafana.
Install InfluxDB:
Install it:
[CODE lang="bash" title="Install lib cURL"]pkg install curl[/CODE]
And link it on the Makefile:
[CODE lang="makefile" title="Link lib on makefile"]-lcurl[/CODE]
Shared lib:
[CODE lang="bash" title="Install lib cURL vcpkg shared"]vcpkg install curl[openssl]:x86-windows[/CODE]
Static lib:
[CODE lang="bash" title="Install lib cURL vcpkg static"]vcpkg install curl[openssl]:x86-windows-static[/CODE]
Don't forget to also make the necessary changes on
On the file
[CODE lang="cpp" title="Edit Time"]void CInfluxData::Check(int day, int hour, int minute, int second) {
int lastNumber = minute % 10;
if (isInfluxEnabled && lastNumber == 0 && second == 00)[/CODE]
If
if (isInfluxEnabled && lastNumber == 0)[/CODE]
The rest of the settings, can either be set on the source or by CONFIG options (this are the default values set on the source):
The source method is preferred.
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
The following tutorial is also available on the GitHub repository.
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Metin2-InfluxDB
The purpose of this is to be able to create dashboards with the timeseries statistics, like the ones seen on the video made with Grafana.
Install InfluxDB:
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Information
If you intend on using Cloudflare (and nginx as reverse proxy, since InfluxDB’s default port is 8086, which isn’t supported by Cloudflare, if you choose the docker installation, just map it to a port supported by Cloudflare, preferably HTTPS), you will need to create a firewall exception to bypass all rules that come from your metin2 game server so it doesn’t get blocked or challenged.
I recommend setting up nginx as reverse proxy, that way the port 443 can be used for all hosts configured on nginx.
On FreeBSD, only InfluxDB 1.8.* is available, not recommended, since the latest major stable version is 2.1. This tutorial was made for version 2.1, there may be differences on the requests.
An IP address can be used, but a domain with SSL setup is preferable, for obvious reasons.
InfluxDB Setup
Create an organization
Create a bucket
Lib cURL
FreeBSD Setup
Install it:
[CODE lang="bash" title="Install lib cURL"]pkg install curl[/CODE]
And link it on the Makefile:
[CODE lang="makefile" title="Link lib on makefile"]-lcurl[/CODE]
Windows Setup
For Windows it works with both vcpkg and compiling the lib manually.Shared lib:
[CODE lang="bash" title="Install lib cURL vcpkg shared"]vcpkg install curl[openssl]:x86-windows[/CODE]
Static lib:
[CODE lang="bash" title="Install lib cURL vcpkg static"]vcpkg install curl[openssl]:x86-windows-static[/CODE]
Auto Event Manager
In case you already have this class/file, just compare and make the necessary changes. All the changes related to Influx are wrapped with the macroINFLUX_STATS.Don't forget to also make the necessary changes on
main.cpp. If you are already using this you won't need to include the header and initialize the class.Edit Time
The default is send the data every 10 minutes.On the file
InfluxData.cpp, edit this code:[CODE lang="cpp" title="Edit Time"]void CInfluxData::Check(int day, int hour, int minute, int second) {
int lastNumber = minute % 10;
if (isInfluxEnabled && lastNumber == 0 && second == 00)[/CODE]
If
lastNumber = 0, then it means the number is divisible by, in this case, 10. Make sure when you edit the time to don't forget the seconds part, if you don't use it, it will run every second inside the minute you want to run it.Examples for other times
Every minute
[CODE lang="cpp" title="Every minute"] if (isInfluxEnabled && second == 00)[/CODE]Every 5 minutes
[CODE lang="cpp" title="Every 5 minutes"] int lastNumber = minute % 5;[/CODE]Every 30 seconds
[CODE lang="cpp" title="Every 30 seconds"] int lastNumber = seconds % 30;if (isInfluxEnabled && lastNumber == 0)[/CODE]
Configuration
To use this make sure you have it only enabled on ONE core per channel, the online counter inside the channel is common between the cores, just add this on the CONFIG file to enable Influx on the core.
Kod:
INFLUX_ENABLE: 1
The rest of the settings, can either be set on the source or by CONFIG options (this are the default values set on the source):
Kod:
INFLUX_URL: http://127.0.0.1:8086
INFLUX_TOKEN: <token>
INFLUX_ORG: <organization>
INFLUX_BUCKET: <bucket>
NodeJS Version
In case you don't to use the source, a NodeJS version is available where you can use the Metin2 API to get the user count and send it to Influx.The source method is preferred.
Acknowledgments:
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
for testing the tutorial on Windows.
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
for testing the tutorial on FreeBSD.- Katılım
- 26 Ocak 2017
- Konular
- 58
- Mesajlar
- 644
- Çözüm
- 9
- Online süresi
- 1mo 13d
- Reaksiyon Skoru
- 400
- Altın Konu
- 0
- TM Yaşı
- 9 Yıl 4 Ay 21 Gün
- Başarım Puanı
- 171
- MmoLira
- 2,083
- DevLira
- 135
Fazer um video com a instalação seria de grande ajuda.
- Katılım
- 27 Ağu 2018
- Konular
- 48
- Mesajlar
- 173
- Çözüm
- 9
- Online süresi
- 20d 14h
- Reaksiyon Skoru
- 38
- Altın Konu
- 0
- TM Yaşı
- 7 Yıl 9 Ay 23 Gün
- Başarım Puanı
- 95
- Yaş
- 27
- MmoLira
- 2,071
- DevLira
- 0
Paylaşım için teşekkürler. Birisi oyun içi ne işe yaradığını daha net anlatabilir mi
- Katılım
- 7 Eyl 2016
- Konular
- 12
- Mesajlar
- 59
- Online süresi
- 3d 16h
- Reaksiyon Skoru
- 42
- Altın Konu
- 0
- TM Yaşı
- 9 Yıl 9 Ay 12 Gün
- Başarım Puanı
- 77
- MmoLira
- 945
- DevLira
- 15
Ingame it doesn't do anything, the source part is just to send the online players of the channel to InfluxDB, that can be used to build dashboards, like the one on the video made with Grafana.Paylaşım için teşekkürler. Birisi oyun içi ne işe yaradığını daha net anlatabilir mi
I could think about it when I have some free time in the next few days.Fazer um video com a instalação seria de grande ajuda.
- Katılım
- 18 Kas 2013
- Konular
- 26
- Mesajlar
- 471
- Online süresi
- 29d 10h
- Reaksiyon Skoru
- 413
- Altın Konu
- 1
- TM Yaşı
- 12 Yıl 7 Ay 1 Gün
- Başarım Puanı
- 139
- MmoLira
- 1,329
- DevLira
- 9
You are doing great things with NodeJS, congratulations. But why not use it on systems like rabbit? I think it would be more beneficial to use sorting systems such as Rabbit. I think that the load on the system will not be felt at all because it lists the intense requests.
Docs :
Docs :
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 14
- Görüntüleme
- 1K
- Cevaplar
- 4
- Görüntüleme
- 99




