Skip to content

Commit

Permalink
Merge pull request #110 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Version  0.4.9
  • Loading branch information
themiszamani authored Mar 26, 2020
2 parents cb0edd4 + 6f0a90d commit 4b924df
Show file tree
Hide file tree
Showing 24 changed files with 754 additions and 2,645 deletions.
47 changes: 47 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pipeline {
agent any
options {
checkoutToSubdirectory('argo-ncg')
}
environment {
PROJECT_DIR="argo-ncg"
GIT_COMMIT=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\"",returnStdout: true).trim()
GIT_COMMIT_HASH=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\" | cut -c1-7",returnStdout: true).trim()
GIT_COMMIT_DATE=sh(script: "date -d \"\$(cd ${WORKSPACE}/$PROJECT_DIR && git show -s --format=%ci ${GIT_COMMIT_HASH})\" \"+%Y%m%d%H%M%S\"",returnStdout: true).trim()

}
stages {
stage ('Centos 7') {
agent {
docker {
image 'argo.registry:5000/epel-7-mgo'
args '-u jenkins:jenkins'
}
}
steps {
echo 'Building Rpm...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
keyFileVariable: 'REPOKEY')]) {
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos7 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
}
stage ('Centos 6') {
agent {
docker {
image 'argo.registry:5000/epel-6'
args '-u jenkins:jenkins'
}
}
steps {
echo 'Building Rpm...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
keyFileVariable: 'REPOKEY')]) {
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos6 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
}
}
}
6 changes: 3 additions & 3 deletions argo-ncg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Summary: ARGO Nagios config generator
Name: argo-ncg
Version: 0.4.8
Version: 0.4.9
Release: 1%{?dist}
License: ASL 2.0
Group: Network/Monitoring
Expand Down Expand Up @@ -46,7 +46,6 @@ install --mode=755 argo-unicore-truststore.sh $RPM_BUILD_ROOT/usr/libexec/%{name
install --directory $RPM_BUILD_ROOT%{configdir}/ncg.conf.d/
install --directory $RPM_BUILD_ROOT%{configdir}/ncg-localdb.d/
install ncg.conf $RPM_BUILD_ROOT%{configdir}
install ncg.conf.example $RPM_BUILD_ROOT%{configdir}
install ncg.localdb $RPM_BUILD_ROOT%{configdir}
install ncg.localdb.example $RPM_BUILD_ROOT%{configdir}
install check_logfiles_ncg.conf $RPM_BUILD_ROOT%{configdir}
Expand Down Expand Up @@ -74,7 +73,6 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{configdir}/ncg.conf.d
%config(noreplace) %{configdir}/ncg.conf
%config(noreplace) %{configdir}/ncg.localdb
%config(noreplace) %{configdir}/ncg.conf.example
%config(noreplace) %{configdir}/ncg.localdb.example
%config(noreplace) %{configdir}/ncg-localdb.d
%config(noreplace) /etc/nagios/argo-ncg.d
Expand All @@ -101,6 +99,8 @@ if [ -f /etc/init.d/ncg ] ; then
fi

%changelog
* Thu Mar 26 2020 Emir Imamagic <[email protected]> - 0.4.9-1
- Version bump
* Thu Dec 21 2017 Emir Imamagic <[email protected]> - 0.4.2-1
- Version bump
* Thu May 25 2017 Emir Imamagic <[email protected]> - 0.3.4-1
Expand Down
144 changes: 60 additions & 84 deletions config/ncg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,20 @@
# Variables in curly brackets are environment
# variables.

SITENAME = ${SITE_NAME}
MAIN_DB_FILE=/etc/ncg/ncg.localdb

MYPROXY_SERVER=${MYPROXY_SERVER}
NAGIOS_SERVER=nagios.my.com
PROBES_TYPE=all

# Set following option if you wish to receive
# email alerts for Nagios internal checks
# default root@localhost
# [email protected]

# Set following option if remote gLite UI node is
# used.
# NRPE_UI=nrpe.srce.hr

# list of VOs for which you wish to run checks
VO = dteam

#
# Some optional config
#
#BDII = bdii.srce.hr
#GLITE_VERSION=3.1.0
# NAGIOS_SERVER = nagios.fqdn
# ENABLE_UNICORE_PROBES=1
# MYPROXY_SERVER = myproxy.fqdn

# Configuration of individual NCG modules.
# First level block represents abstract module.
Expand All @@ -42,91 +32,77 @@ VO = dteam
# parameters passed at invocation.

<Nagios>
# pick global values
GLITE_VERSION=$GLITE_VERSION

# Directories used by NCG
TEMPLATES_DIR = /usr/share/grid-monitoring/config-gen/nagios
OUTPUT_DIR = /etc/nagios/wlcg.d
NRPE_OUTPUT_DIR = /etc/nagios/nrpe/
RESOURCES_OUTPUT_DIR = /etc/nagios

# Modify following to values used for creating MyProxy
# credential with command myproxy-init
# myproxy-init argument -k
MYPROXY_NAME=NagiosRetrieve
# myproxy-init argument -l
MYPROXY_USER=nagios
NAGIOS_ROLE = ngi
INCLUDE_EMPTY_HOSTS = 0
ENABLE_NOTIFICATIONS = 0
SEND_TO_DASHBOARD = 0
CHECK_HOSTS = 0
TENANT = ARGO-TEST
ROBOT_CERT=/etc/nagios/globus/robocert.pem
ROBOT_KEY=/etc/nagios/globus/robokey.pem
USE_ROBOT_CERT=1
SEND_TO_MSG = 0
</Nagios>

</NCG::ConfigGen>


# NCG modules for gathering site information
<NCG::SiteSet>
<GOCDB>
GOCDB_ROOT_URL=https://goc.egi.eu/gocdbpi
ENABLE_UNICORE_PROBES=$ENABLE_UNICORE_PROBES
ROC=NGI_HR
</GOCDB>
<File>
DB_FILE=/etc/argo-ncg/ncg.localdb
DB_DIRECTORY=/etc/argo-ncg/ncg-localdb.d
</File>
</NCG::SiteSet>
<NCG::SiteInfo>

# Example of simple module with no parameters.
<SAM/>

<LDAP>
LDAP_ADDRESS=$BDII
ADD_HOSTS=0
</LDAP>

<GOCDB>
GOCDB_ROOT_URL=https://goc.egi.eu/gocdbpi
</GOCDB>
<File>
DB_FILE=$MAIN_DB_FILE
DB_FILE=/etc/argo-ncg/ncg.localdb
DB_DIRECTORY=/etc/argo-ncg/ncg-localdb.d
</File>
</NCG::SiteInfo>

# NCG modules for gathering metrics & attributes
<NCG::LocalMetrics>
<WEBAPI>
WEBAPI_ROOT_URL = https://api.devel.argo.grnet.gr
PROFILES = ARGO_TEST,ARGO_MON,MW_MONITOR,OPS_MONITOR
TOKEN = TOKEN_STRING
</WEBAPI>
<File>
DB_FILE=/etc/argo-ncg/ncg.localdb
DB_DIRECTORY=/etc/argo-ncg/ncg-localdb.d
</File>
</NCG::LocalMetrics>
<NCG::MetricConfig>
<POEM>
POEM_ROOT_URL = http://egi.poem.devel.argo.grnet.gr
TOKEN = POEM_TOKEN_STRING
</POEM>
</NCG::MetricConfig>
<NCG::LocalMetricsAttrs>
<LDAP>
LDAP_ADDRESS=$BDII
</LDAP>

<Active>
GLITE_VERSION=$GLITE_VERSION

# Following options filter SAM tests
#
# Option SAM_INCLUDE_ALL to 1 includes all SAM results
# by default only critical ar included
# SAM_INCLUDE_ALL=1
#
# Option SAM_VOS filters VOs for which SAM results
# are gathered
# WARNING: VO names are case sensitive, fetch available
# VOs with following command (from Nagios server):
# wget -q -O - http://lcg-sam.cern.ch:8080/same-pi/vo_names.jsp \
# | xmllint --format -
# SAM_VOS=OPS
GOCDB_ROOT_URL=https://goc.egi.eu/gocdbpi
ENABLE_UNICORE_PROBES=$ENABLE_UNICORE_PROBES
BDII_HOST=bdii.fqdn
INCLUDE_PROXY_CHECKS = 1
INCLUDE_MSG_CHECKS_SEND = 0
</Active>

<LDAP>
LDAP_ADDRESS=bdii.fqdn
BDII_LEVEL=top
</LDAP>
<File>
DB_FILE=$MAIN_DB_FILE
DB_FILE=/etc/argo-ncg/ncg.localdb
DB_DIRECTORY=/etc/argo-ncg/ncg-localdb.d
</File>
</NCG::LocalMetricsAttrs>

<NCG::LocalRules>
<File>
DB_FILE=$MAIN_DB_FILE
</File>
</NCG::LocalRules>

<NCG::LocalMetrics>
<File>
DB_FILE=$MAIN_DB_FILE
</File>

<Hash/>
</NCG::LocalMetrics>

<NCG::RemoteMetrics>
<SAM>
SAM_INCLUDE_ALL=$SAM_INCLUDE_ALL
SAM_VOS=$SAM_VOS
SAM_ROOT_URL=$SAM_ROOT_URL
</SAM>

<NPM/>
</NCG::RemoteMetrics>

# Include any custom configuration.
include ncg.conf.d/*.conf
Loading

0 comments on commit 4b924df

Please sign in to comment.