GithubHelp home page GithubHelp logo

rudolf-barbu / ward Goto Github PK

View Code? Open in Web Editor NEW
2.2K 24.0 216.0 4.91 MB

Server dashboard

License: MIT License

CSS 37.59% JavaScript 17.09% Java 26.61% HTML 18.71%
linux monitoring monitoring-tool server dashboard cpu-monitoring web java spring-boot spring

ward's Introduction

Logo


About

Ward is a simple and minimalistic server monitoring tool. Ward supports adaptive design system. Also, it supports dark theme. It shows only principal information and can be used, if you want to see nice looking dashboard instead looking on bunch of numbers and graphs. Ward works nice on all popular operating systems, because it uses OSHI.

All features tested on: Windows Linux

Preview Image

Preview Image

Installation

Create your own .jar

• Clone the project
• Import project in your IDE as Maven project
• mvn clean package

Run .jar file

• Download latest .jar from releases section
• Execute jar on Windows or Linux with administrative rights
• Enter localhost:4000 and set up application

ward's People

Contributors

andrewsmithdev avatar dbwiddis avatar hibare avatar immaax avatar keeo avatar ljhrot avatar nangidev avatar rudolf-barbu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ward's Issues

Spacing Issue

Built via jar file, seeing some spacing issues.

On Firefox 68.9EBR running Debian 10:
Ward-Firefox68 9EBR-Debian10

On Firefox 77.01 (64bit) running Windows 10.
Ward-Firefox-Win10

class not accessible

If i want to compile with "mvn clean package", this error drops:

class lombok.javac.apt.LombokProcessor (in unnamed module @0x69feb4d9) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x69feb4d9

Docker

Could this work from inside a docker container?

GPU monitoring

Hi, this is fantastic!

I would like to discuss how feasible it would be to add GPU monitoring to this service; ie. I would like to add a block that displayed GPU utilization / how many are use. Is that easy to add? How extensible is this to add a new block? I would be willing to spend roughly one day to hack on this.

Thanks!

IndexOutOfBoundsException when setting RamType

When running the code on my local computer and trying to load the dashboard I get 404 error because when trying to fetch physical memory type it returns an empty list.

Expected Behavior

If not being able to determine memory type it should not crash, but rather state so in the interface.

Current Behavior

404 errer page when trying to navigate to dashboard

Possible Solution

Check length of list before getting memory type and take action depending on content.
A simple if-else-statement would work or a stream.

Steps to Reproduce

  1. Clone repo
  2. Run mvn clean install
  3. Start Ward server
  4. Navigate to localhost: in web browser

Context (Environment)

OS: Ubuntu 18.04
JDK: OpenJDK-11.0.5
Browser: Firefox

I just wanted to initially run the code to look on possible ways of dockerize it.
Workaround for now is to add an if-statement around the code

Detailed Description

globalMemory.getPhysicalMemory() in empty when trying to get ram type to display on dashboard. It then throws IndexOutOfBoundsException and displays 404 error on dashboard

Possible Implementation

Replace row 75 in InfoService.java with:

List<PhysicalMemory> physicalMem = globalMemory.getPhysicalMemory();
if (physicalMem.isEmpty()) {
    infoDto.setRamType("Unknown");
} else {
    infoDto.setRamType(physicalMem.get(0).getMemoryType());
}

Misc

I saw that there already is an issue to refactor #10 this class so I am guessing it might get resolved at the same time.

InfoService refactorings

As others mentioned on Reddit, your code is not testable (yet). You cannot make the whole codebase testable in one go, you have to go incrementally. I've looked at the code and InfoService is a good starting point. You're injecting a InfoDto, which is really not doing much for you, just getting a reference with no fields set, which is as good as InfoDto infoDto = new InfoDto(); so you don't need injection for that, just use the constructor in the get() method.

Next, your methods are all returning void. Some are really trivial to refactor, e.g. getUptimeInfo. You could make this return Map<String, String> and set it in the get() method, like this:

public InfoDto get() {
  InfoDto infoDto = new InfoDto();
  infoDto.setUptime(getUptimeInfo());
  return infoDto;
}

The rest of the methods are not so simple to refactor and require some thoughts. If we look at getProcessorInfo you're setting quite a bit of fields, but they really shouldn't be added directly to the infoDto as fields. Maybe create a ProcessorDto to hold those properties(cpu name, core count, clock speed, etc.) and InfoDto could use a single instance of ProcessorDto. You'd have to either change the implementation of the InfoDto getters to delegate to ProcessorDto, e.g. getCoreCount() { return processorDto.getCoreCount(); } or remove the getters from InfoDto, move them to ProcessorDto and change the template to from info.coreCount to info.processor.coreCount which is probably much cleaner.

It should be easier to construct a InfoDto instance and have control of what it can hold, which in the end make it available to be the subject under test.

I realize this might look like quite a bit of work but it's actually rather minor when you start coding. If you would like me to continue adding some more tickets for things you can improve in your code, I'm happy to do so and maybe add a PR or two in the future, if time allows.

docker run error

[root@local1 ward]# docker build --tag ward .
Sending build context to Docker daemon  48.54MB
Step 1/10 : FROM adoptopenjdk/openjdk8
latest: Pulling from adoptopenjdk/openjdk8
a1125296b23d: Pull complete 
3c742a4a0f38: Pull complete 
4c5ea3b32996: Pull complete 
1b4be91ead68: Pull complete 
b620337f9be3: Pull complete 
1aabc7dffd2d: Pull complete 
Digest: sha256:78b8e200377696052a805391a5c6b5766086d2c3c2138d4e2900792aaf5a150d
Status: Downloaded newer image for adoptopenjdk/openjdk8:latest
 ---> 594e8d1f0a12
Step 2/10 : ARG USER=user
 ---> Running in fcebd3b7d862
Removing intermediate container fcebd3b7d862
 ---> 0aa365d9d8ad
Step 3/10 : RUN apt-get update && apt-get install -y sudo
 ---> Running in ede9ced20b2b
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [89.0 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [9,282 B]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,003 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,405 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [103 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,303 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [13.6 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [8,158 B]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [8,286 B]
Get:18 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [869 kB]
Fetched 18.2 MB in 29s (630 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 427 kB of archives.
After this operation, 1,765 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 sudo amd64 1.8.21p2-3ubuntu1.2 [427 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 427 kB in 2s (209 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 7239 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.21p2-3ubuntu1.2_amd64.deb ...
Unpacking sudo (1.8.21p2-3ubuntu1.2) ...
Setting up sudo (1.8.21p2-3ubuntu1.2) ...
Removing intermediate container ede9ced20b2b
 ---> df3bc2afd3d0
Step 4/10 : RUN adduser --disabled-password --gecos '' $USER
 ---> Running in 252178efd477
Adding user `user' ...
Adding new group `user' (1000) ...
Adding new user `user' (1000) with group `user' ...
Creating home directory `/home/user' ...
Copying files from `/etc/skel' ...
Removing intermediate container 252178efd477
 ---> 778a805d0699
Step 5/10 : RUN adduser $USER sudo
 ---> Running in 5e568462f97f
Adding user `user' to group `sudo' ...
Adding user user to group sudo
Done.
Removing intermediate container 5e568462f97f
 ---> 785bb4eebb05
Step 6/10 : RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/$USER
 ---> Running in ac2ca5c2b498
Removing intermediate container ac2ca5c2b498
 ---> ec8ce0736255
Step 7/10 : USER $USER
 ---> Running in 8fa746024ec2
Removing intermediate container 8fa746024ec2
 ---> 2ea0df840906
Step 8/10 : RUN sudo ln -s $JAVA_HOME/bin/java/usr/bin/java
 ---> Running in ed0daf28317c
Removing intermediate container ed0daf28317c
 ---> 3a2f0d0d43aa
Step 9/10 : COPY target/*.jar /ward.jar
 ---> 117e5c2fbd7b
Step 10/10 : ENTRYPOINT sudo java -jar ward.jar
 ---> Running in 4d4947e336f8
Removing intermediate container 4d4947e336f8
 ---> 97dbdf8338d3
Successfully built 97dbdf8338d3
Successfully tagged ward:latest


docker run --rm -it --name ward -p 7999:80 ward
sudo: java: command not found

Can you please upload you docker image to hub.docker.com
Thanks
Right now, java -jar is working

Error on visiting the page.

I managed to install and load and start it, but when I go to the page, I get an error.

I don't understand this, how do I fix it?

root@admin:~/ward# docker run --rm -it --name ward -p 4000:4000 -p 443:443 --privileged ward

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.0)

2021-07-23 07:17:24.521  INFO 1 --- [           main] org.bsoftware.ward.Ward                  : Starting Ward v1.8.8 using Java 1.8.0_212 on 8e5ec7d32959 with PID 1 (/ward.jar started by root in /)
2021-07-23 07:17:24.526  INFO 1 --- [           main] org.bsoftware.ward.Ward                  : No active profile set, falling back to default profiles: default
2021-07-23 07:17:25.809  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 4000 (http)
2021-07-23 07:17:25.822  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-07-23 07:17:25.822  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.39]
2021-07-23 07:17:25.876  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-07-23 07:17:25.877  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1259 ms
2021-07-23 07:17:26.164  INFO 1 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-07-23 07:17:26.279  INFO 1 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2021-07-23 07:17:26.506  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 4000 (http) with context path ''
2021-07-23 07:17:26.516  INFO 1 --- [           main] org.bsoftware.ward.Ward                  : Started Ward in 2.443 seconds (JVM running for 2.957)


# When visiting the page.


2021-07-23 07:17:31.134  INFO 1 --- [nio-4000-exec-1] o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x020x000x010x000x010xfc0x030x030xcd0x8a0xd60x8c0x880xb00x950xf50xba0x900xa50xe80xf90xcd0x860xe82D0xa00x140xf90x900x8e0xab0xe30xa2"0x850xc00xc3U&]. HTTP method names must be tokens
        at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:417) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:261) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_212]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_212]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]

2021-07-23 07:17:31.134  INFO 1 --- [nio-4000-exec-2] o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x020x000x010x000x010xfc0x030x030x830x08\vo}A0x0ac(0x1e0xfd0x0a0x1el20x040xfe0xe40xae0xb40x0a>E0xe2O;0x0b0xa80x800xb10x10]. HTTP method names must be tokens
        at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:417) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:261) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_212]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_212]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]

Add ability to build JAR with docker

It would be cool to modify dockerfile to allow building from withint the docker using staged build. That way one would not need to install java on host in order to run this. I tried to do it like this but it crashes after setup.

docker run --rm -it --name ward -p 4000:4000 -p 5000:5000 --privileged ward
2020-07-19 09:46:45.152  INFO 8 --- [nio-5000-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-07-19 09:46:45.153  INFO 8 --- [nio-5000-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-07-19 09:46:45.157  INFO 8 --- [nio-5000-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 4 ms
2020-07-19 09:46:45.278 ERROR 8 --- [nio-5000-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

java.io.FileNotFoundException: pom.xml (No such file or directory)
	at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_262]
	at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_262]
	at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_262]
	at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[na:1.8.0_262]
	at java.io.FileReader.<init>(FileReader.java:58) ~[na:1.8.0_262]
	at org.bsoftware.ward.services.implementation.InfoService.getMavenDto(InfoService.java:224) ~[classes!/:1.6.0]
	at org.bsoftware.ward.services.implementation.InfoService.get(InfoService.java:247) ~[classes!/:1.6.0]
	at org.bsoftware.ward.controllers.IndexController.getIndex(IndexController.java:49) ~[classes!/:1.6.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_262]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_262]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_262]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_262]
FROM maven:3.6.3-jdk-8 as builder
COPY . .
RUN mvn clean package

FROM adoptopenjdk:8-jre-hotspot
ARG USER=user
RUN apt-get update && \
    apt-get install -y sudo && \
    apt-get install -yq dmidecode && \
    rm -rf /var/lib/apt/lists/*

RUN adduser --disabled-password --gecos '' $USER

RUN adduser $USER sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/$USER
USER $USER
RUN sudo ln -s $JAVA_HOME/bin/java /usr/bin/java
COPY --from=builder target/*.jar /ward.jar
EXPOSE 4000
ENTRYPOINT sudo java -jar ward.jar

Storage shows strange info

This what Ward shows:

<div class = "detailed-hw-info">
  <div id = "totalStorage" class = "first-label">16 GiB Total</div>
  <div id = "diskCount" class = "second-label">6 Disks</div>
  <div class = "third-label">935 MiB Swap</div>
</div>

However my Pi has only single card (1 disk) with 2 partitions on it:

$ lsblk

NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0  14.6G  0 disk 
`-mmcblk1p1  179:1    0  14.4G  0 part /
mmcblk1boot0 179:32   0     4M  1 disk 
mmcblk1boot1 179:64   0     4M  1 disk 
zram0        252:0    0    50M  0 disk /var/log
zram1        252:1    0 935.6M  0 disk [SWAP]
$ df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            801M     0  801M   0% /dev
tmpfs           188M  5.1M  183M   3% /run
/dev/mmcblk1p1   15G  2.6G   12G  19% /
tmpfs           936M     0  936M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           936M     0  936M   0% /sys/fs/cgroup
tmpfs           936M   36K  936M   1% /tmp
/dev/zram0       49M  3.5M   42M   8% /var/log
tmpfs           188M     0  188M   0% /run/user/1000

Not a big deal, but seams strange.

PS. Thanks for persistent config! Greatly appreciate.

Docker image?

Is there an official image for this in dockerhub? I would like to use this on my kubernetes cluster, but don't want to set up my own script to check for updates on github, re-pull, and then build it to my own registry (as that would make me set up a registry for other people's code, and that is less than ideal).

Unable to access to Ward after initializing the port

Hello,

I followed the instructions for a docker installation, and I don't have any error in logs, as you can see here :

2020-12-09 15:46:18.180 INFO 1 --- [ Thread-3] o.s.boot.SpringApplication : Starting application using Java 1.8.0_212 on 61090399b3e0 with PID 1 (/ward.jar started by root in /)
2020-12-09 15:46:18.181 INFO 1 --- [ Thread-3] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
2020-12-09 15:46:19.101 INFO 1 --- [ Thread-3] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 4001 (http)
2020-12-09 15:46:19.103 INFO 1 --- [ Thread-3] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-12-09 15:46:19.104 INFO 1 --- [ Thread-3] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39]
2020-12-09 15:46:19.112 INFO 1 --- [ Thread-3] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-12-09 15:46:19.112 INFO 1 --- [ Thread-3] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 914 ms
2020-12-09 15:46:19.273 INFO 1 --- [ Thread-3] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-12-09 15:46:19.313 INFO 1 --- [ Thread-3] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2020-12-09 15:46:19.408 INFO 1 --- [ Thread-3] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 4001 (http) with context path ''
2020-12-09 15:46:19.416 INFO 1 --- [ Thread-3] o.s.boot.SpringApplication : Started application in 1.364 seconds (JVM running for 8.731)

Moreover, I tried with the 4001 port because when I'm typing 4000 it says me "Use another port".
Do you have an idea why ?

Ward does not remember its settings

I have created a little systemd ward.service:

[Unit]
Description=Minimalistic server monitoring tool.

[Service]
WorkingDirectory=/opt/ward
ExecStart=/usr/bin/java -Xms128m -Xmx256m -jar ward.jar
Type=fork
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

When I start it for the first time, the Ward creates /opt/ward/settings.ini:

[setup]
serverName = server-name
theme = light
port = 4001

And starts to serve on port :4001 - all fine and dandy.
However, once restarted, it throws:

INFO 2781 --- [main] org.bsoftware.ward.Ward : No active profile set, falling back to default profiles: default

and the play begins again on port :4000.

How can one force using the new profile?

Disk display suggestions

I have multiple hard disks, but only one hard disk is displayed. I think the disk can be turned off and replaced by the network activity

Why do you need two ports?

I am confused about why you need two ports to the same application .. what is the purpose of this?

It makes it difficult to put this behind a reverse proxy, and as far as I can see, there is no information in the readme about why this is needed.

FYI: I pushed the docker image to a public Docker Hub repo: https://hub.docker.com/repository/docker/sohape/ward/ - hope that is OK? (I see MIT license, so I assume it is, but let me know if I should remove it again)

Thanks a lot for creating the project - it looks really nice!

when the application run in windows11 error

When I use windows 11 to access the application, the website returns 500 and I debug and find that an exception is thrown, as shown in the figure
image
By querying the problem, it was confirmed that the jna version was lower, so it was upgraded to the latest version and the problem was solved

非常好的监控软件

整洁明朗的页面,非常好用。后续可以将监控项再扩展点。

我再使用过程中返现一个BUG,就是服务器安装了docker ,ward在统计磁盘容量时容易重复统计。

ajax revoken may cause too deep stack

the api request in usage.js, it call a request in a recursion form, and it would not stop when the page is display for long time.
I suggest for setting it as a interval as the info api does.

Docker on ARM64 dont work

Sending build context to Docker daemon  9.348MB
Step 1/9 : FROM maven:3.6.3-jdk-8 as builder
3.6.3-jdk-8: Pulling from library/maven
no matching manifest for linux/arm64/v8 in the manifest list entries

sudo: java: command not found

After executing commands from cloned project root, docker run returns sudo: java: command not found

commands executed:

mvn clean package
docker build --tag ward .
docker run --rm -it --name ward -p 8082:80 ward

Passing application port via environment variable

Hey!

First of all: awesome project!

I installed it using Docker on my VPS behind Traefik as edge router and I noticed that the initialization-step is a bit unhandy in this particular use case because I need an open port to specify the application port which is then routed via Traefik.

It would be awesome if the initialization step could be bypassed by using predefined environment variables to set the initialization parameters.

For eyample:

WARD_SERVERNAME="My Server"
WARD_PORT="8080"
WARD_THEME="dark"

Network?

Hi,I think you can add the function of real-time display of network in and out,it is very practical

hello

如果能更新一个实时流量监控就更好了~
笔芯

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.