Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden - archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
713
Warden
Warden - archive
Commits
0bb458f8
Commit
0bb458f8
authored
9 years ago
by
Michal Kostěnec
Committed by
root
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Test for correct options for anonymisation
Minor updates
parent
a8dc34c5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
warden3/contrib/connectors/hp-kippo/README
+1
-1
1 addition, 1 deletion
warden3/contrib/connectors/hp-kippo/README
warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py
+6
-3
6 additions, 3 deletions
warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py
with
7 additions
and
4 deletions
warden3/contrib/connectors/hp-kippo/README
+
1
−
1
View file @
0bb458f8
...
@@ -56,7 +56,7 @@ D. Configuration
...
@@ -56,7 +56,7 @@ D. Configuration
cron
cron
SCRIPT_PATH=/opt/warden_client/
SCRIPT_PATH=/opt/warden_client/
*/5 * * * * root cd $SCRIPT_PATH; warden3-kippo-sender.py > /dev/null 2>&1
*/5 * * * * root cd $SCRIPT_PATH;
python
warden3-kippo-sender.py > /dev/null 2>&1
Note: Repeat interval must be the same as value of 'awin'.
Note: Repeat interval must be the same as value of 'awin'.
...
...
This diff is collapsed.
Click to expand it.
warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py
+
6
−
3
View file @
0bb458f8
...
@@ -11,6 +11,7 @@ from time import time, gmtime, strftime
...
@@ -11,6 +11,7 @@ from time import time, gmtime, strftime
from
math
import
trunc
from
math
import
trunc
from
uuid
import
uuid4
from
uuid
import
uuid4
from
os
import
path
from
os
import
path
import
sys
import
MySQLdb
as
my
import
MySQLdb
as
my
import
MySQLdb.cursors
as
mycursors
import
MySQLdb.cursors
as
mycursors
...
@@ -71,14 +72,16 @@ def main():
...
@@ -71,14 +72,16 @@ def main():
awin
=
aconfig
.
get
(
'
awin
'
,
DEFAULT_AWIN
)
*
60
awin
=
aconfig
.
get
(
'
awin
'
,
DEFAULT_AWIN
)
*
60
wconfig
[
'
name
'
]
=
aname
wconfig
[
'
name
'
]
=
aname
wclient
=
Client
(
**
wconfig
)
aanonymised
=
aconfig
.
get
(
'
anonymised
'
,
DEFAULT_ANONYMISED
)
aanonymised
=
aconfig
.
get
(
'
anonymised
'
,
DEFAULT_ANONYMISED
)
atargetnet
=
aconfig
.
get
(
'
target_net
'
,
DEFAULT_TARGET_NET
)
if
aanonymised
not
in
[
'
no
'
,
'
yes
'
,
'
omit
'
]:
wclient
.
logger
.
error
(
"
Configuration error: anonymised:
'
%s
'
- possible typo? use
'
no
'
,
'
yes
'
or
'
omit
'"
%
aanonymised
)
sys
.
exit
(
2
)
atargetnet
=
aconfig
.
get
(
'
target_net
'
,
DEFAULT_TARGET_NET
)
aanonymised
=
aanonymised
if
(
atargetnet
!=
DEFAULT_TARGET_NET
)
or
(
aanonymised
==
'
omit
'
)
else
DEFAULT_ANONYMISED
aanonymised
=
aanonymised
if
(
atargetnet
!=
DEFAULT_TARGET_NET
)
or
(
aanonymised
==
'
omit
'
)
else
DEFAULT_ANONYMISED
wclient
=
Client
(
**
wconfig
)
con
=
my
.
connect
(
host
=
aconfig
[
'
dbhost
'
],
user
=
aconfig
[
'
dbuser
'
],
passwd
=
aconfig
[
'
dbpass
'
],
con
=
my
.
connect
(
host
=
aconfig
[
'
dbhost
'
],
user
=
aconfig
[
'
dbuser
'
],
passwd
=
aconfig
[
'
dbpass
'
],
db
=
aconfig
[
'
dbname
'
],
port
=
aconfig
[
'
dbport
'
],
cursorclass
=
mycursors
.
DictCursor
)
db
=
aconfig
[
'
dbname
'
],
port
=
aconfig
[
'
dbport
'
],
cursorclass
=
mycursors
.
DictCursor
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment