diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-15 09:29:24 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 09:29:24 +0000 |
commit | 75928a71530563940c6ee261b53a3f9bca8523f4 (patch) | |
tree | c0f6b7464cbfd5cfc090bd626c9b8f664d55c721 | |
parent | ace31b280981fb968111f557c378361d257d2817 (diff) |
automatic import of python-agent360
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-agent360.spec | 383 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 385 insertions, 0 deletions
@@ -0,0 +1 @@ +/agent360-1.2.43.tar.gz diff --git a/python-agent360.spec b/python-agent360.spec new file mode 100644 index 0000000..942081c --- /dev/null +++ b/python-agent360.spec @@ -0,0 +1,383 @@ +%global _empty_manifest_terminate_build 0 +Name: python-agent360 +Version: 1.2.43 +Release: 1 +Summary: 360 agent +License: BSD-3-Clause +URL: https://github.com/plesk/agent360 +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b0/b0/5fe1da76e7856d8545b0b14229afebfb6234d196633e6e433b2e8d9129f7/agent360-1.2.43.tar.gz +BuildArch: noarch + +Requires: python3-psutil +Requires: python3-netifaces +Requires: python3-configparser +Requires: python3-future +Requires: python3-distro + +%description +# Agent360 + +360 Monitoring ([360monitoring.com](https://360monitoring.com)) is a web service that monitors and displays statistics of +your server performance. + +Agent360 is OS agnostic software compatible with Python 2.7, 3.5, and 3.6. +It's been optimized to have low CPU consumption and comes with an +extendable set of useful plugins. + +[](https://github.com/plesk/agent360/actions/workflows/test-and-deploy.yml) + +## Documentation + +You can find the full documentation including the feature complete REST API at [docs.360monitoring.com](https://docs.360monitoring.com/docs) and [docs.360monitoring.com/docs/api](https://docs.360monitoring.com/docs/api). + +## Automatic Installation (All Linux Distributions) + +You can install the default configuration of Agent360 on all Linux distributions with just one click. + +1. Connect to your server via SSH. + +2. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. + +3. Run the following command: + + ```sh + wget -q -N https://monitoring.platform360.io/agent360.sh && bash agent360.sh USERTOKEN + ``` + +## Automatic Installation (Windows) + +Download the [setup](https://github.com/plesk/agent360/releases) and install it on your Windows server. + +The installer will ask for your USERTOKEN which you can get [from the servers page](https://monitoring.platform360.io/servers/overview). + +## Manual Installation + +To customize installation options, install Agent360 manually. + +1. Connect to your server via SSH. +2. Run the following command, which differs depending on your server platform: + + - Debian GNU/Linux: + + ```sh + apt-get install python3-devel python3-setuptools python3-pip + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 6 or earlier (python 2.7): + + ```sh + yum install python-devel python-setuptools gcc + easy_install agent360 netifaces psutil + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 7 and later (python 3): + + ```sh + yum install python36-devel python36 gcc + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + +3. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. You need this to generate a serverid. + +4. Run the following command (USERTOKEN is the one you got during the previous step): + + ```sh + agent360 hello USERTOKEN /etc/agent360-token.ini + ``` + +5. Create a systemd service at `/etc/systemd/system/agent360.service` by adding the following: + + ```ini + [Unit] + Description=Agent360 + + [Service] + ExecStart=/usr/local/bin/agent360 + User=agent360 + + [Install] + WantedBy=multi-user.target + ``` + +6. Run the following command: + + ```sh + chmod 644 /etc/systemd/system/agent360.service + systemctl daemon-reload + systemctl enable agent360 + systemctl start agent360 + ``` + +## Building Windows setup + +Prerequisite: [InnoSetup](https://jrsoftware.org/isdl.php) is used as the installer, build script assumes that it is installed in the default location. + +Run `php windows/build.php` to create setup file. + + +%package -n python3-agent360 +Summary: 360 agent +Provides: python-agent360 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-agent360 +# Agent360 + +360 Monitoring ([360monitoring.com](https://360monitoring.com)) is a web service that monitors and displays statistics of +your server performance. + +Agent360 is OS agnostic software compatible with Python 2.7, 3.5, and 3.6. +It's been optimized to have low CPU consumption and comes with an +extendable set of useful plugins. + +[](https://github.com/plesk/agent360/actions/workflows/test-and-deploy.yml) + +## Documentation + +You can find the full documentation including the feature complete REST API at [docs.360monitoring.com](https://docs.360monitoring.com/docs) and [docs.360monitoring.com/docs/api](https://docs.360monitoring.com/docs/api). + +## Automatic Installation (All Linux Distributions) + +You can install the default configuration of Agent360 on all Linux distributions with just one click. + +1. Connect to your server via SSH. + +2. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. + +3. Run the following command: + + ```sh + wget -q -N https://monitoring.platform360.io/agent360.sh && bash agent360.sh USERTOKEN + ``` + +## Automatic Installation (Windows) + +Download the [setup](https://github.com/plesk/agent360/releases) and install it on your Windows server. + +The installer will ask for your USERTOKEN which you can get [from the servers page](https://monitoring.platform360.io/servers/overview). + +## Manual Installation + +To customize installation options, install Agent360 manually. + +1. Connect to your server via SSH. +2. Run the following command, which differs depending on your server platform: + + - Debian GNU/Linux: + + ```sh + apt-get install python3-devel python3-setuptools python3-pip + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 6 or earlier (python 2.7): + + ```sh + yum install python-devel python-setuptools gcc + easy_install agent360 netifaces psutil + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 7 and later (python 3): + + ```sh + yum install python36-devel python36 gcc + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + +3. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. You need this to generate a serverid. + +4. Run the following command (USERTOKEN is the one you got during the previous step): + + ```sh + agent360 hello USERTOKEN /etc/agent360-token.ini + ``` + +5. Create a systemd service at `/etc/systemd/system/agent360.service` by adding the following: + + ```ini + [Unit] + Description=Agent360 + + [Service] + ExecStart=/usr/local/bin/agent360 + User=agent360 + + [Install] + WantedBy=multi-user.target + ``` + +6. Run the following command: + + ```sh + chmod 644 /etc/systemd/system/agent360.service + systemctl daemon-reload + systemctl enable agent360 + systemctl start agent360 + ``` + +## Building Windows setup + +Prerequisite: [InnoSetup](https://jrsoftware.org/isdl.php) is used as the installer, build script assumes that it is installed in the default location. + +Run `php windows/build.php` to create setup file. + + +%package help +Summary: Development documents and examples for agent360 +Provides: python3-agent360-doc +%description help +# Agent360 + +360 Monitoring ([360monitoring.com](https://360monitoring.com)) is a web service that monitors and displays statistics of +your server performance. + +Agent360 is OS agnostic software compatible with Python 2.7, 3.5, and 3.6. +It's been optimized to have low CPU consumption and comes with an +extendable set of useful plugins. + +[](https://github.com/plesk/agent360/actions/workflows/test-and-deploy.yml) + +## Documentation + +You can find the full documentation including the feature complete REST API at [docs.360monitoring.com](https://docs.360monitoring.com/docs) and [docs.360monitoring.com/docs/api](https://docs.360monitoring.com/docs/api). + +## Automatic Installation (All Linux Distributions) + +You can install the default configuration of Agent360 on all Linux distributions with just one click. + +1. Connect to your server via SSH. + +2. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. + +3. Run the following command: + + ```sh + wget -q -N https://monitoring.platform360.io/agent360.sh && bash agent360.sh USERTOKEN + ``` + +## Automatic Installation (Windows) + +Download the [setup](https://github.com/plesk/agent360/releases) and install it on your Windows server. + +The installer will ask for your USERTOKEN which you can get [from the servers page](https://monitoring.platform360.io/servers/overview). + +## Manual Installation + +To customize installation options, install Agent360 manually. + +1. Connect to your server via SSH. +2. Run the following command, which differs depending on your server platform: + + - Debian GNU/Linux: + + ```sh + apt-get install python3-devel python3-setuptools python3-pip + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 6 or earlier (python 2.7): + + ```sh + yum install python-devel python-setuptools gcc + easy_install agent360 netifaces psutil + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + + - Fedora/CentOS version 7 and later (python 3): + + ```sh + yum install python36-devel python36 gcc + pip3 install agent360 + wget -O /etc/agent360.ini https://monitoring.platform360.io/agent360.ini + ``` + +3. Find your USERTOKEN. To do so, [go to the servers page](https://monitoring.platform360.io/servers/overview) and then click the "Add server" button. You need this to generate a serverid. + +4. Run the following command (USERTOKEN is the one you got during the previous step): + + ```sh + agent360 hello USERTOKEN /etc/agent360-token.ini + ``` + +5. Create a systemd service at `/etc/systemd/system/agent360.service` by adding the following: + + ```ini + [Unit] + Description=Agent360 + + [Service] + ExecStart=/usr/local/bin/agent360 + User=agent360 + + [Install] + WantedBy=multi-user.target + ``` + +6. Run the following command: + + ```sh + chmod 644 /etc/systemd/system/agent360.service + systemctl daemon-reload + systemctl enable agent360 + systemctl start agent360 + ``` + +## Building Windows setup + +Prerequisite: [InnoSetup](https://jrsoftware.org/isdl.php) is used as the installer, build script assumes that it is installed in the default location. + +Run `php windows/build.php` to create setup file. + + +%prep +%autosetup -n agent360-1.2.43 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-agent360 -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.43-1 +- Package Spec generated @@ -0,0 +1 @@ +7fed6d1fa125b4b3a6267ea43a6a907f agent360-1.2.43.tar.gz |