Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rsyslog-exporter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
silver-platter
rsyslog-exporter
Commits
da3c5ac3
Commit
da3c5ac3
authored
8 years ago
by
cellscape
Committed by
ale
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Exit on stdin EOF
parent
2035b9ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
exporter.go
+1
-4
1 addition, 4 deletions
exporter.go
with
1 addition
and
4 deletions
exporter.go
+
1
−
4
View file @
da3c5ac3
...
...
@@ -3,7 +3,6 @@ package main
import
(
"bufio"
"os"
"strings"
"sync"
"github.com/prometheus/client_golang/prometheus"
...
...
@@ -116,9 +115,7 @@ func (re *rsyslogExporter) Collect(ch chan<- prometheus.Metric) {
func
(
re
*
rsyslogExporter
)
run
()
{
for
re
.
scanner
.
Scan
()
{
if
strings
.
Contains
(
re
.
scanner
.
Text
(),
"EOF"
)
{
os
.
Exit
(
0
)
}
re
.
handleStatLine
(
re
.
scanner
.
Bytes
())
}
os
.
Exit
(
0
)
}
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