소스 검색

add image labels, license, safer dump files

Grega Bremec 2 년 전
부모
커밋
f50a63ac29
5개의 변경된 파일54개의 추가작업 그리고 3개의 파일을 삭제
  1. 31 0
      COPYING
  2. 10 0
      images/Containerfile-psacct
  3. 10 0
      images/Containerfile-sysstat
  4. 2 2
      images/entrypoint-psacct.sh
  5. 1 1
      images/entrypoint-sysstat.sh

+ 31 - 0
COPYING

@@ -0,0 +1,31 @@
+This software is being published under terms and conditions set forth
+by the BSD License.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of P0F.NET nor the names of contributors may
+      be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+

+ 10 - 0
images/Containerfile-psacct

@@ -13,5 +13,15 @@ VOLUME /var/account
 ARG STARTUP_SCRATCH
 ARG CUMULATIVE
 
+LABEL description="Minimal psacct collector sidecar image" \
+	io.k8s.description="Minimal psacct collector sidecar image" \
+	io.k8s.display-name="psacct collector" \
+	io.openshift.expose-services="" \
+	maintainer="Grega Bremec <gregab@p0f.net> \
+	vendor="P0F" \
+	version="v1.0" \
+	release="1.0" \
+	License=BSD
+
 ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
 

+ 10 - 0
images/Containerfile-sysstat

@@ -13,5 +13,15 @@ VOLUME /var/log/sa
 ARG STARTUP_SCRATCH
 ARG STARTUP_ROTATE
 
+LABEL description="Minimal sysstat collector sidecar image" \
+	io.k8s.description="Minimal sysstat collector sidecar image" \
+	io.k8s.display-name="sysstat collector" \
+	io.openshift.expose-services="" \
+	maintainer="Grega Bremec <gregab@p0f.net> \
+	vendor="P0F" \
+	version="v1.0" \
+	release="1.0" \
+	License=BSD
+
 ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
 

+ 2 - 2
images/entrypoint-psacct.sh

@@ -54,8 +54,8 @@ while [ 1  ]; do
     sleep ${PERIOD}
 
     # Report after waking up.
-    /usr/sbin/sa -ajlp > /var/account/dump-all
-    /usr/sbin/dump-acct /var/account/pacct > /var/account/dump-raw
+    /usr/sbin/sa -ajlp > /var/account/psacct-dump-all
+    /usr/sbin/dump-acct /var/account/pacct > /var/account/psacct-dump-raw
 
     # Could make a CSV out of the above "sa":
     #   | tr -s' ' | sed 's/^ //; s/ /,/g'

+ 1 - 1
images/entrypoint-sysstat.sh

@@ -50,7 +50,7 @@ while [ 1 ]; do
     # Produce the report.
     REPORT_FROM=$(date +%H:%M:%S -d "${REPORT_LENGTH} seconds ago")
     REPORT_UNTIL=$(date +%H:%M:%S)
-    /usr/bin/sadf -s ${REPORT_FROM} -e ${REPORT_UNTIL} -j -- -A > /var/log/sa/dump.json
+    /usr/bin/sadf -s ${REPORT_FROM} -e ${REPORT_UNTIL} -j -- -A > /var/log/sa/sysstat-dump.json
 
     # Have we awoken in a new day? Rotation record, please!
     NEW_HOUR="$(date +%H)"